From aee6afdc78b69a92d212ed760fd545e76f83c079 Mon Sep 17 00:00:00 2001 From: binsta Date: Sun, 1 Oct 2023 05:01:22 +0530 Subject: [PATCH 01/14] [workspace.lint] add in Cargo.toml and nightly add CI for experiment for [lint] --- .github/workflows/ci.yml | 3 ++- Cargo.toml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b12596bb6c..c31abd52594 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -201,7 +201,8 @@ jobs: matrix: rust-version: [ 1.72.0, # current stable - beta + beta, + nightly-2023-09-10 ] steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 73ae23d70ff..9de93b75a81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -128,3 +128,10 @@ multihash = "0.19.1" # we import via `rust-multiaddr`. # This is expected to stay here until we move `libp2p-identity` to a separate repository which makes the dependency relationship more obvious. libp2p-identity = { path = "identity" } + +# lint +[workspace.lints.clippy] +used_underscore_binding = "warn" +unreachable_pub = "warn" +pedantic = "allow" +type_complexity = "allow" From 29e810660dbac586ea3aa0661a99c9b5ff9db300 Mon Sep 17 00:00:00 2001 From: binsta Date: Sun, 1 Oct 2023 08:24:38 +0530 Subject: [PATCH 02/14] CI run only on nightly-2023-09-10 and entire workspace has [lints] --- .github/workflows/ci.yml | 6 +++--- core/Cargo.toml | 4 ++++ examples/autonat/Cargo.toml | 3 +++ examples/browser-webrtc/Cargo.toml | 3 +++ examples/chat/Cargo.toml | 3 +++ examples/dcutr/Cargo.toml | 3 +++ examples/distributed-key-value-store/Cargo.toml | 3 +++ examples/file-sharing/Cargo.toml | 3 +++ examples/identify/Cargo.toml | 3 +++ examples/ipfs-kad/Cargo.toml | 3 +++ examples/ipfs-private/Cargo.toml | 3 +++ examples/metrics/Cargo.toml | 3 +++ examples/ping/Cargo.toml | 3 +++ examples/relay-server/Cargo.toml | 3 +++ examples/rendezvous/Cargo.toml | 3 +++ examples/upnp/Cargo.toml | 3 +++ identity/Cargo.toml | 3 +++ interop-tests/Cargo.toml | 3 +++ libp2p/Cargo.toml | 3 +++ misc/allow-block-list/Cargo.toml | 3 +++ misc/connection-limits/Cargo.toml | 3 +++ misc/futures-bounded/Cargo.toml | 3 +++ misc/keygen/Cargo.toml | 3 +++ misc/memory-connection-limits/Cargo.toml | 3 +++ misc/metrics/Cargo.toml | 3 +++ misc/multistream-select/Cargo.toml | 3 +++ misc/quick-protobuf-codec/Cargo.toml | 3 +++ misc/quickcheck-ext/Cargo.toml | 3 +++ misc/rw-stream-sink/Cargo.toml | 3 +++ misc/server/Cargo.toml | 3 +++ misc/webrtc-utils/Cargo.toml | 3 +++ muxers/mplex/Cargo.toml | 3 +++ muxers/test-harness/Cargo.toml | 3 +++ muxers/yamux/Cargo.toml | 3 +++ protocols/autonat/Cargo.toml | 3 +++ protocols/dcutr/Cargo.toml | 3 +++ protocols/floodsub/Cargo.toml | 3 +++ protocols/gossipsub/Cargo.toml | 3 +++ protocols/identify/Cargo.toml | 3 +++ protocols/kad/Cargo.toml | 3 +++ protocols/mdns/Cargo.toml | 3 +++ protocols/perf/Cargo.toml | 3 +++ protocols/ping/Cargo.toml | 3 +++ protocols/relay/Cargo.toml | 3 +++ protocols/rendezvous/Cargo.toml | 3 +++ protocols/request-response/Cargo.toml | 3 +++ protocols/upnp/Cargo.toml | 3 +++ swarm-derive/Cargo.toml | 3 +++ swarm-test/Cargo.toml | 3 +++ swarm/Cargo.toml | 3 +++ transports/deflate/Cargo.toml | 3 +++ transports/dns/Cargo.toml | 3 +++ transports/noise/Cargo.toml | 3 +++ transports/plaintext/Cargo.toml | 3 +++ transports/pnet/Cargo.toml | 3 +++ transports/quic/Cargo.toml | 3 +++ transports/tcp/Cargo.toml | 3 +++ transports/tls/Cargo.toml | 3 +++ transports/uds/Cargo.toml | 3 +++ transports/wasm-ext/Cargo.toml | 3 +++ transports/webrtc-websys/Cargo.toml | 3 +++ transports/webrtc/Cargo.toml | 3 +++ transports/websocket/Cargo.toml | 3 +++ transports/webtransport-websys/Cargo.toml | 3 +++ wasm-tests/webtransport-tests/Cargo.toml | 3 +++ 65 files changed, 196 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c31abd52594..bdadd7ad939 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -200,8 +200,8 @@ jobs: fail-fast: false matrix: rust-version: [ - 1.72.0, # current stable - beta, + # 1.72.0, # current stable + # beta, nightly-2023-09-10 ] steps: @@ -219,7 +219,7 @@ jobs: save-if: ${{ github.ref == 'refs/heads/master' }} - name: Run cargo clippy - run: cargo custom-clippy # cargo alias to allow reuse of config locally + run: cargo clippy # cargo alias to allow reuse of config locally ipfs-integration-test: name: IPFS Integration tests diff --git a/core/Cargo.toml b/core/Cargo.toml index ecf3c153312..304bb7f5b05 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -50,3 +50,7 @@ serde = ["multihash/serde-codec", "dep:serde", "libp2p-identity/serde"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] + +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index 741c29de0a0..b3c700f5004 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -11,3 +11,6 @@ clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index 99263dde2b3..4a5397731d0 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -38,3 +38,6 @@ wasm-bindgen = "0.2.84" wasm-bindgen-futures = "0.4.37" wasm-logger = { version = "0.2.0" } web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index 9c539c851d7..3c16f8300f5 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -11,3 +11,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["tokio", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux", "quic"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 852083d0977..5b5cbc63642 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -12,3 +12,6 @@ futures = "0.3.28" futures-timer = "3.0" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "quic", "relay", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index d128d6bbc51..d1f8da9f0b1 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -11,3 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 03745aacb00..b07b93997ff 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -14,3 +14,6 @@ env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "cbor", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } void = "1.0.2" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index fb14aeba4a5..e342268669b 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -11,3 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 0526060eaa6..adc576d5693 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -11,3 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index 278611e6aa1..5527490e3d0 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -12,3 +12,6 @@ either = "1.9" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index b81c0142fd9..9e1b01d9d32 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -13,3 +13,6 @@ libp2p = { path = "../../libp2p", features = ["async-std", "metrics", "ping", "n log = "0.4.20" tokio = { version = "1", features = ["rt-multi-thread"] } prometheus-client = "0.21.2" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 33c9e56b45c..9990459ce25 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -11,3 +11,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 49c32cd3b50..d2e24900a09 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -12,3 +12,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay", "quic"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index a66c758e018..f99698dbda8 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -13,3 +13,6 @@ futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" tokio = { version = "1.32", features = [ "rt-multi-thread", "macros", "time" ] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index afb8f61d2a2..a81db4d7c42 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -9,3 +9,6 @@ license = "MIT" tokio = { version = "1", features = [ "rt-multi-thread", "macros"] } futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["tokio", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux", "upnp"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/identity/Cargo.toml b/identity/Cargo.toml index d8f4d9ef3ce..ed3b7f7b4ff 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -56,3 +56,6 @@ harness = false all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 1966aee414d..6427d619970 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -42,3 +42,6 @@ instant = "0.1.12" reqwest = { version = "0.11", features = ["json"] } console_error_panic_hook = { version = "0.1.7" } futures-timer = "3.0.2" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 6b11d7deec4..0b1912e048d 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -155,3 +155,6 @@ libp2p-tcp = { workspace = true, features = ["tokio"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/allow-block-list/Cargo.toml b/misc/allow-block-list/Cargo.toml index 42a6f634272..f4ac705edcf 100644 --- a/misc/allow-block-list/Cargo.toml +++ b/misc/allow-block-list/Cargo.toml @@ -19,3 +19,6 @@ void = "1" async-std = { version = "1.12.0", features = ["attributes"] } libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/connection-limits/Cargo.toml b/misc/connection-limits/Cargo.toml index 25347e29b16..88956b03831 100644 --- a/misc/connection-limits/Cargo.toml +++ b/misc/connection-limits/Cargo.toml @@ -23,3 +23,6 @@ libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } quickcheck = { workspace = true } rand = "0.8.5" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/futures-bounded/Cargo.toml b/misc/futures-bounded/Cargo.toml index fae7528ad9c..f0e67c07829 100644 --- a/misc/futures-bounded/Cargo.toml +++ b/misc/futures-bounded/Cargo.toml @@ -18,3 +18,6 @@ futures-timer = "3.0.2" [dev-dependencies] tokio = { version = "1.29.1", features = ["macros", "rt"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/keygen/Cargo.toml b/misc/keygen/Cargo.toml index b695915011d..06197722115 100644 --- a/misc/keygen/Cargo.toml +++ b/misc/keygen/Cargo.toml @@ -17,3 +17,6 @@ serde_json = "1.0.107" libp2p-core = { workspace = true } base64 = "0.21.4" libp2p-identity = { workspace = true } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/memory-connection-limits/Cargo.toml b/misc/memory-connection-limits/Cargo.toml index 6bfecfd2b0e..3fac540d0cb 100644 --- a/misc/memory-connection-limits/Cargo.toml +++ b/misc/memory-connection-limits/Cargo.toml @@ -24,3 +24,6 @@ libp2p-identify = { workspace = true } libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } rand = "0.8.5" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index 1ea026a9202..e6f7545e9fd 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -38,3 +38,6 @@ prometheus-client = { version = "0.21.2"} all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 8d19e3e5b5c..174877ea202 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -32,3 +32,6 @@ rw-stream-sink = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 37cdd07f225..940bdd067b9 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -23,3 +23,6 @@ quick-protobuf = "0.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/quickcheck-ext/Cargo.toml b/misc/quickcheck-ext/Cargo.toml index 0c427dc4fc9..d32ee5fb844 100644 --- a/misc/quickcheck-ext/Cargo.toml +++ b/misc/quickcheck-ext/Cargo.toml @@ -8,3 +8,6 @@ license = "Unlicense/MIT" [dependencies] quickcheck = "1" num-traits = "0.2" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/rw-stream-sink/Cargo.toml b/misc/rw-stream-sink/Cargo.toml index b6d02c28201..fa1534300f3 100644 --- a/misc/rw-stream-sink/Cargo.toml +++ b/misc/rw-stream-sink/Cargo.toml @@ -24,3 +24,6 @@ async-std = "1.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/server/Cargo.toml b/misc/server/Cargo.toml index aa259ce8214..961fcd94f7f 100644 --- a/misc/server/Cargo.toml +++ b/misc/server/Cargo.toml @@ -25,3 +25,6 @@ serde_derive = "1.0.125" serde_json = "1.0" tokio = { version = "1", features = ["rt-multi-thread", "macros"] } zeroize = "1" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index a3a5bef9ce2..b2d8d7a84ad 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -30,3 +30,6 @@ asynchronous-codec = "0.6" [dev-dependencies] hex-literal = "0.4" unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 50a2d10571e..532916af096 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -43,3 +43,6 @@ harness = false all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/muxers/test-harness/Cargo.toml b/muxers/test-harness/Cargo.toml index af73de33f8c..fba6244e041 100644 --- a/muxers/test-harness/Cargo.toml +++ b/muxers/test-harness/Cargo.toml @@ -13,3 +13,6 @@ futures = "0.3.28" log = "0.4" futures-timer = "3.0.2" futures_ringbuf = "0.4.0" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/muxers/yamux/Cargo.toml b/muxers/yamux/Cargo.toml index 11b94ac9738..ac752013b75 100644 --- a/muxers/yamux/Cargo.toml +++ b/muxers/yamux/Cargo.toml @@ -27,3 +27,6 @@ libp2p-muxer-test-harness = { path = "../test-harness" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 4a8c9fe71d6..2cc525d4bf5 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -34,3 +34,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index acade64cae8..6d94a41b1fe 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -47,3 +47,6 @@ rand = "0.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 2484624da8e..37922e67cb8 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -31,3 +31,6 @@ thiserror = "1.0.48" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index e4ed4e565b8..e532a3ea1d1 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -58,3 +58,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 557f5a18736..2ce7dad3ac1 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -39,3 +39,6 @@ libp2p-swarm = { workspace = true, features = ["macros"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 5b2a74080b3..5897e4d1ad5 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -54,3 +54,6 @@ serde = ["dep:serde", "bytes/serde"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index c200c478321..0a488073461 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -55,3 +55,6 @@ required-features = ["tokio"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/perf/Cargo.toml b/protocols/perf/Cargo.toml index 41b91ea1209..bc55b99a5f2 100644 --- a/protocols/perf/Cargo.toml +++ b/protocols/perf/Cargo.toml @@ -43,3 +43,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index 29cf5985b76..eff7b9ff543 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -35,3 +35,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index a13ba2bb229..d0b14614561 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -43,3 +43,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index b231f9d7c24..f4fa2630dd3 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -46,3 +46,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index 3b228fe20b3..34a9fa491d5 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -46,3 +46,6 @@ serde = { version = "1.0", features = ["derive"]} all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/protocols/upnp/Cargo.toml b/protocols/upnp/Cargo.toml index 4121745de42..4130efed58e 100644 --- a/protocols/upnp/Cargo.toml +++ b/protocols/upnp/Cargo.toml @@ -22,3 +22,6 @@ tokio = { version = "1.29", default-features = false, features = ["rt"], optiona [features] tokio = ["igd-next/aio_tokio", "dep:tokio"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index 75a3ac29eee..bd978f56ac9 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -26,3 +26,6 @@ proc-macro2 = "1.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/swarm-test/Cargo.toml b/swarm-test/Cargo.toml index 67753b1c522..cbe5b3bc927 100644 --- a/swarm-test/Cargo.toml +++ b/swarm-test/Cargo.toml @@ -23,3 +23,6 @@ futures = "0.3.28" log = "0.4.20" rand = "0.8.5" futures-timer = "3.0.2" +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index a991bacd53e..7161940b8d3 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -67,3 +67,6 @@ required-features = ["macros"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/deflate/Cargo.toml b/transports/deflate/Cargo.toml index 95f552f63c8..8b633d2dfd0 100644 --- a/transports/deflate/Cargo.toml +++ b/transports/deflate/Cargo.toml @@ -28,3 +28,6 @@ futures_ringbuf = "0.4.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index 81ee2312089..b474bbd8d8d 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -41,3 +41,6 @@ tokio-dns-over-https-rustls = ["tokio", "trust-dns-resolver/dns-over-https-rustl all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 3ebf0364a1b..3f20eb63e25 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -43,3 +43,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 573114672da..faedde2dc98 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -33,3 +33,6 @@ futures_ringbuf = "0.4.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 5861bf2d987..23757a7137d 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -35,3 +35,6 @@ tokio = { version = "1.32.0", features = ["full"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 671032a845d..2448f01d6ad 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -50,3 +50,6 @@ tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread", "time"] } [[test]] name = "stream_compliance" required-features = ["async-std"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index ffee29c54c6..cb00e828ee9 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -38,3 +38,6 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index ba60164cd3e..3b7872d2019 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -41,3 +41,6 @@ tokio = { version = "1.32.0", features = ["full"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index d776ac3366d..07108d09b0f 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -26,3 +26,6 @@ tempfile = "3.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/wasm-ext/Cargo.toml b/transports/wasm-ext/Cargo.toml index d7deba525e0..85a1be16138 100644 --- a/transports/wasm-ext/Cargo.toml +++ b/transports/wasm-ext/Cargo.toml @@ -27,3 +27,6 @@ websocket = [] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 19148068fce..98d7b678411 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -34,3 +34,6 @@ web-sys = { version = "0.3.64", features = ["Document", "Location", "MessageEven hex-literal = "0.4" libp2p-ping = { workspace = true } libp2p-swarm = { workspace = true, features = ["wasm-bindgen"] } +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index 7cd16f2ceb2..43d14e2be51 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -45,3 +45,6 @@ quickcheck = "1.0.3" [[test]] name = "smoke" required-features = ["tokio"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index f3ebf5af000..091c199afdd 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -36,3 +36,6 @@ rcgen = "0.10.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml index 7825f64a8ab..896748a1cd7 100644 --- a/transports/webtransport-websys/Cargo.toml +++ b/transports/webtransport-websys/Cargo.toml @@ -46,3 +46,6 @@ multibase = "0.9.1" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] +# lint +[lints] +workspace = true \ No newline at end of file diff --git a/wasm-tests/webtransport-tests/Cargo.toml b/wasm-tests/webtransport-tests/Cargo.toml index 6c564281274..1f32f450998 100644 --- a/wasm-tests/webtransport-tests/Cargo.toml +++ b/wasm-tests/webtransport-tests/Cargo.toml @@ -18,3 +18,6 @@ wasm-bindgen = "0.2.87" wasm-bindgen-futures = "0.4.37" wasm-bindgen-test = "0.3.37" web-sys = { version = "0.3.64", features = ["Response", "Window"] } +# lint +[lints] +workspace = true \ No newline at end of file From 58563408a1e2b7714d8ba7a9e60b5cc8b746a1a0 Mon Sep 17 00:00:00 2001 From: binsta Date: Tue, 3 Oct 2023 02:55:08 +0530 Subject: [PATCH 03/14] rust.unreachable_pub has added in lints, Comment has removed from Cargo.toml --- Cargo.toml | 10 +++++----- core/Cargo.toml | 1 - examples/autonat/Cargo.toml | 2 +- examples/browser-webrtc/Cargo.toml | 2 +- examples/chat/Cargo.toml | 2 +- examples/dcutr/Cargo.toml | 2 +- examples/distributed-key-value-store/Cargo.toml | 2 +- examples/file-sharing/Cargo.toml | 2 +- examples/identify/Cargo.toml | 2 +- examples/ipfs-kad/Cargo.toml | 2 +- examples/ipfs-private/Cargo.toml | 2 +- examples/metrics/Cargo.toml | 2 +- examples/ping/Cargo.toml | 2 +- examples/relay-server/Cargo.toml | 2 +- examples/rendezvous/Cargo.toml | 2 +- examples/upnp/Cargo.toml | 2 +- identity/Cargo.toml | 2 +- interop-tests/Cargo.toml | 2 +- libp2p/Cargo.toml | 2 +- misc/allow-block-list/Cargo.toml | 2 +- misc/connection-limits/Cargo.toml | 2 +- misc/futures-bounded/Cargo.toml | 2 +- misc/keygen/Cargo.toml | 2 +- misc/memory-connection-limits/Cargo.toml | 2 +- misc/metrics/Cargo.toml | 2 +- misc/multistream-select/Cargo.toml | 2 +- misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/quickcheck-ext/Cargo.toml | 2 +- misc/rw-stream-sink/Cargo.toml | 2 +- misc/server/Cargo.toml | 2 +- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/Cargo.toml | 2 +- muxers/test-harness/Cargo.toml | 2 +- muxers/yamux/Cargo.toml | 2 +- protocols/autonat/Cargo.toml | 2 +- protocols/dcutr/Cargo.toml | 2 +- protocols/floodsub/Cargo.toml | 2 +- protocols/gossipsub/Cargo.toml | 2 +- protocols/identify/Cargo.toml | 2 +- protocols/kad/Cargo.toml | 2 +- protocols/mdns/Cargo.toml | 2 +- protocols/perf/Cargo.toml | 2 +- protocols/ping/Cargo.toml | 2 +- protocols/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- protocols/request-response/Cargo.toml | 2 +- protocols/upnp/Cargo.toml | 2 +- swarm-derive/Cargo.toml | 2 +- swarm-test/Cargo.toml | 2 +- swarm/Cargo.toml | 2 +- transports/deflate/Cargo.toml | 2 +- transports/dns/Cargo.toml | 2 +- transports/noise/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- transports/pnet/Cargo.toml | 2 +- transports/quic/Cargo.toml | 2 +- transports/tcp/Cargo.toml | 2 +- transports/tls/Cargo.toml | 2 +- transports/uds/Cargo.toml | 2 +- transports/wasm-ext/Cargo.toml | 2 +- transports/webrtc-websys/Cargo.toml | 2 +- transports/webrtc/Cargo.toml | 2 +- transports/websocket/Cargo.toml | 2 +- transports/webtransport-websys/Cargo.toml | 2 +- wasm-tests/webtransport-tests/Cargo.toml | 2 +- 65 files changed, 68 insertions(+), 69 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9de93b75a81..9785f3c8910 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -130,8 +130,8 @@ multihash = "0.19.1" libp2p-identity = { path = "identity" } # lint -[workspace.lints.clippy] -used_underscore_binding = "warn" -unreachable_pub = "warn" -pedantic = "allow" -type_complexity = "allow" +[workspace.lints] +rust.unreachable_pub = "warn" +clippy.used_underscore_binding = "warn" +clippy.pedantic = "allow" +clippy.type_complexity = "allow" diff --git a/core/Cargo.toml b/core/Cargo.toml index 304bb7f5b05..66eaf8fef6a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -51,6 +51,5 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint [lints] workspace = true \ No newline at end of file diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index b3c700f5004..cead85850fc 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -11,6 +11,6 @@ clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index 4a5397731d0..83d110c359f 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -38,6 +38,6 @@ wasm-bindgen = "0.2.84" wasm-bindgen-futures = "0.4.37" wasm-logger = { version = "0.2.0" } web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index 3c16f8300f5..e8541d5bf53 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -11,6 +11,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["tokio", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux", "quic"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 5b5cbc63642..3195c829f53 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -12,6 +12,6 @@ futures = "0.3.28" futures-timer = "3.0" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "quic", "relay", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index d1f8da9f0b1..1689dec3000 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -11,6 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index b07b93997ff..247a78f83f3 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -14,6 +14,6 @@ env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "cbor", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } void = "1.0.2" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index e342268669b..241616281f9 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -11,6 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index adc576d5693..c333c346bec 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -11,6 +11,6 @@ async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index 5527490e3d0..09fc790a3fc 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -12,6 +12,6 @@ either = "1.9" env_logger = "0.10" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index 9e1b01d9d32..b6edcabba90 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -13,6 +13,6 @@ libp2p = { path = "../../libp2p", features = ["async-std", "metrics", "ping", "n log = "0.4.20" tokio = { version = "1", features = ["rt-multi-thread"] } prometheus-client = "0.21.2" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 9990459ce25..d3595e909ab 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -11,6 +11,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index d2e24900a09..74f31a13929 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -12,6 +12,6 @@ async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay", "quic"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index f99698dbda8..14286a95c8a 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -13,6 +13,6 @@ futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" tokio = { version = "1.32", features = [ "rt-multi-thread", "macros", "time" ] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index a81db4d7c42..f1c775db7a5 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -9,6 +9,6 @@ license = "MIT" tokio = { version = "1", features = [ "rt-multi-thread", "macros"] } futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["tokio", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux", "upnp"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/identity/Cargo.toml b/identity/Cargo.toml index ed3b7f7b4ff..d00122c54cb 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -56,6 +56,6 @@ harness = false all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 6427d619970..7de1b15623b 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -42,6 +42,6 @@ instant = "0.1.12" reqwest = { version = "0.11", features = ["json"] } console_error_panic_hook = { version = "0.1.7" } futures-timer = "3.0.2" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 0b1912e048d..2eb16483d47 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -155,6 +155,6 @@ libp2p-tcp = { workspace = true, features = ["tokio"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/allow-block-list/Cargo.toml b/misc/allow-block-list/Cargo.toml index f4ac705edcf..5a40d65907c 100644 --- a/misc/allow-block-list/Cargo.toml +++ b/misc/allow-block-list/Cargo.toml @@ -19,6 +19,6 @@ void = "1" async-std = { version = "1.12.0", features = ["attributes"] } libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/connection-limits/Cargo.toml b/misc/connection-limits/Cargo.toml index 88956b03831..c7cdae2d246 100644 --- a/misc/connection-limits/Cargo.toml +++ b/misc/connection-limits/Cargo.toml @@ -23,6 +23,6 @@ libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } quickcheck = { workspace = true } rand = "0.8.5" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/futures-bounded/Cargo.toml b/misc/futures-bounded/Cargo.toml index f0e67c07829..b9191e957a6 100644 --- a/misc/futures-bounded/Cargo.toml +++ b/misc/futures-bounded/Cargo.toml @@ -18,6 +18,6 @@ futures-timer = "3.0.2" [dev-dependencies] tokio = { version = "1.29.1", features = ["macros", "rt"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/keygen/Cargo.toml b/misc/keygen/Cargo.toml index 06197722115..e25c01d4e6f 100644 --- a/misc/keygen/Cargo.toml +++ b/misc/keygen/Cargo.toml @@ -17,6 +17,6 @@ serde_json = "1.0.107" libp2p-core = { workspace = true } base64 = "0.21.4" libp2p-identity = { workspace = true } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/memory-connection-limits/Cargo.toml b/misc/memory-connection-limits/Cargo.toml index 3fac540d0cb..8430c02b2a2 100644 --- a/misc/memory-connection-limits/Cargo.toml +++ b/misc/memory-connection-limits/Cargo.toml @@ -24,6 +24,6 @@ libp2p-identify = { workspace = true } libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } rand = "0.8.5" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index e6f7545e9fd..a2967f7e5db 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -38,6 +38,6 @@ prometheus-client = { version = "0.21.2"} all-features = true rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index 174877ea202..d0f3ef38d8a 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -32,6 +32,6 @@ rw-stream-sink = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index 940bdd067b9..e0d817a9a28 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -23,6 +23,6 @@ quick-protobuf = "0.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/quickcheck-ext/Cargo.toml b/misc/quickcheck-ext/Cargo.toml index d32ee5fb844..23b8800cc7e 100644 --- a/misc/quickcheck-ext/Cargo.toml +++ b/misc/quickcheck-ext/Cargo.toml @@ -8,6 +8,6 @@ license = "Unlicense/MIT" [dependencies] quickcheck = "1" num-traits = "0.2" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/rw-stream-sink/Cargo.toml b/misc/rw-stream-sink/Cargo.toml index fa1534300f3..6dc6b291c48 100644 --- a/misc/rw-stream-sink/Cargo.toml +++ b/misc/rw-stream-sink/Cargo.toml @@ -24,6 +24,6 @@ async-std = "1.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/server/Cargo.toml b/misc/server/Cargo.toml index 961fcd94f7f..33fce777ddd 100644 --- a/misc/server/Cargo.toml +++ b/misc/server/Cargo.toml @@ -25,6 +25,6 @@ serde_derive = "1.0.125" serde_json = "1.0" tokio = { version = "1", features = ["rt-multi-thread", "macros"] } zeroize = "1" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index b2d8d7a84ad..349f3d4c80d 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -30,6 +30,6 @@ asynchronous-codec = "0.6" [dev-dependencies] hex-literal = "0.4" unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index 532916af096..a5495ccba0b 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -43,6 +43,6 @@ harness = false all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/muxers/test-harness/Cargo.toml b/muxers/test-harness/Cargo.toml index fba6244e041..94ac486c27b 100644 --- a/muxers/test-harness/Cargo.toml +++ b/muxers/test-harness/Cargo.toml @@ -13,6 +13,6 @@ futures = "0.3.28" log = "0.4" futures-timer = "3.0.2" futures_ringbuf = "0.4.0" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/muxers/yamux/Cargo.toml b/muxers/yamux/Cargo.toml index ac752013b75..2a401388e1e 100644 --- a/muxers/yamux/Cargo.toml +++ b/muxers/yamux/Cargo.toml @@ -27,6 +27,6 @@ libp2p-muxer-test-harness = { path = "../test-harness" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 2cc525d4bf5..85bdda2c232 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -34,6 +34,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index 6d94a41b1fe..1f38cff57ca 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -47,6 +47,6 @@ rand = "0.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index 37922e67cb8..af3796f8fc3 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -31,6 +31,6 @@ thiserror = "1.0.48" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index e532a3ea1d1..fe718e2b9bb 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -58,6 +58,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 2ce7dad3ac1..f07e6427a8c 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -39,6 +39,6 @@ libp2p-swarm = { workspace = true, features = ["macros"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 5897e4d1ad5..3e98b474066 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -54,6 +54,6 @@ serde = ["dep:serde", "bytes/serde"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index 0a488073461..76c5eaff71d 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -55,6 +55,6 @@ required-features = ["tokio"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/perf/Cargo.toml b/protocols/perf/Cargo.toml index bc55b99a5f2..fb6d3a25cd6 100644 --- a/protocols/perf/Cargo.toml +++ b/protocols/perf/Cargo.toml @@ -43,6 +43,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index eff7b9ff543..9b2840ef75d 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -35,6 +35,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index d0b14614561..86d0a00842b 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -43,6 +43,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index f4fa2630dd3..84b0151ab09 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -46,6 +46,6 @@ libp2p-swarm-test = { path = "../../swarm-test" } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index 34a9fa491d5..579f73ee23e 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -46,6 +46,6 @@ serde = { version = "1.0", features = ["derive"]} all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/protocols/upnp/Cargo.toml b/protocols/upnp/Cargo.toml index 4130efed58e..ec6667035a5 100644 --- a/protocols/upnp/Cargo.toml +++ b/protocols/upnp/Cargo.toml @@ -22,6 +22,6 @@ tokio = { version = "1.29", default-features = false, features = ["rt"], optiona [features] tokio = ["igd-next/aio_tokio", "dep:tokio"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index bd978f56ac9..1c8dbf0557d 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -26,6 +26,6 @@ proc-macro2 = "1.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/swarm-test/Cargo.toml b/swarm-test/Cargo.toml index cbe5b3bc927..82d021ff8da 100644 --- a/swarm-test/Cargo.toml +++ b/swarm-test/Cargo.toml @@ -23,6 +23,6 @@ futures = "0.3.28" log = "0.4.20" rand = "0.8.5" futures-timer = "3.0.2" -# lint + [lints] workspace = true \ No newline at end of file diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index 7161940b8d3..77f7fcd9aae 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -67,6 +67,6 @@ required-features = ["macros"] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/deflate/Cargo.toml b/transports/deflate/Cargo.toml index 8b633d2dfd0..7f4471ac9ab 100644 --- a/transports/deflate/Cargo.toml +++ b/transports/deflate/Cargo.toml @@ -28,6 +28,6 @@ futures_ringbuf = "0.4.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index b474bbd8d8d..eb93694beae 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -41,6 +41,6 @@ tokio-dns-over-https-rustls = ["tokio", "trust-dns-resolver/dns-over-https-rustl all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 3f20eb63e25..19b4fbde51c 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -43,6 +43,6 @@ quickcheck = { workspace = true } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index faedde2dc98..70f8ac35fee 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -33,6 +33,6 @@ futures_ringbuf = "0.4.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 23757a7137d..667f4111085 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -35,6 +35,6 @@ tokio = { version = "1.32.0", features = ["full"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 2448f01d6ad..08a5b756332 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -50,6 +50,6 @@ tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread", "time"] } [[test]] name = "stream_compliance" required-features = ["async-std"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index cb00e828ee9..745a31a098a 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -38,6 +38,6 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index 3b7872d2019..7cf12ad4d46 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -41,6 +41,6 @@ tokio = { version = "1.32.0", features = ["full"] } all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 07108d09b0f..31bdaafef43 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -26,6 +26,6 @@ tempfile = "3.8" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/wasm-ext/Cargo.toml b/transports/wasm-ext/Cargo.toml index 85a1be16138..64f989fbeb3 100644 --- a/transports/wasm-ext/Cargo.toml +++ b/transports/wasm-ext/Cargo.toml @@ -27,6 +27,6 @@ websocket = [] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 98d7b678411..6773058c86a 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -34,6 +34,6 @@ web-sys = { version = "0.3.64", features = ["Document", "Location", "MessageEven hex-literal = "0.4" libp2p-ping = { workspace = true } libp2p-swarm = { workspace = true, features = ["wasm-bindgen"] } -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index 43d14e2be51..fd7b5890162 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -45,6 +45,6 @@ quickcheck = "1.0.3" [[test]] name = "smoke" required-features = ["tokio"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index 091c199afdd..7c6ba16743b 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -36,6 +36,6 @@ rcgen = "0.10.0" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml index 896748a1cd7..df56e53b41a 100644 --- a/transports/webtransport-websys/Cargo.toml +++ b/transports/webtransport-websys/Cargo.toml @@ -46,6 +46,6 @@ multibase = "0.9.1" all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] -# lint + [lints] workspace = true \ No newline at end of file diff --git a/wasm-tests/webtransport-tests/Cargo.toml b/wasm-tests/webtransport-tests/Cargo.toml index 1f32f450998..8342e91d7e4 100644 --- a/wasm-tests/webtransport-tests/Cargo.toml +++ b/wasm-tests/webtransport-tests/Cargo.toml @@ -18,6 +18,6 @@ wasm-bindgen = "0.2.87" wasm-bindgen-futures = "0.4.37" wasm-bindgen-test = "0.3.37" web-sys = { version = "0.3.64", features = ["Response", "Window"] } -# lint + [lints] workspace = true \ No newline at end of file From c3c2c52ff7c13bde03fa9a0ac90a20a542e3a00c Mon Sep 17 00:00:00 2001 From: binsta Date: Tue, 3 Oct 2023 03:35:35 +0530 Subject: [PATCH 04/14] red marker removed --- Cargo.toml | 2 +- core/Cargo.toml | 6 +-- examples/autonat/Cargo.toml | 10 ++++- examples/browser-webrtc/Cargo.toml | 29 ++++++++++++-- examples/chat/Cargo.toml | 11 +++++- examples/dcutr/Cargo.toml | 16 +++++++- .../distributed-key-value-store/Cargo.toml | 12 +++++- examples/file-sharing/Cargo.toml | 13 ++++++- examples/identify/Cargo.toml | 15 ++++++- examples/ipfs-kad/Cargo.toml | 11 +++++- examples/ipfs-private/Cargo.toml | 15 ++++++- examples/metrics/Cargo.toml | 11 +++++- examples/ping/Cargo.toml | 11 +++++- examples/relay-server/Cargo.toml | 12 +++++- examples/rendezvous/Cargo.toml | 14 ++++++- examples/upnp/Cargo.toml | 14 ++++++- identity/Cargo.toml | 27 +++++++++---- interop-tests/Cargo.toml | 29 ++++++++++++-- libp2p/Cargo.toml | 39 +++++++++++++++---- protocols/autonat/Cargo.toml | 5 ++- swarm-derive/Cargo.toml | 8 +++- swarm/Cargo.toml | 18 +++++---- transports/dns/Cargo.toml | 14 +++++-- transports/noise/Cargo.toml | 8 +++- transports/pnet/Cargo.toml | 7 +++- transports/quic/Cargo.toml | 11 +++++- transports/tcp/Cargo.toml | 4 +- transports/tls/Cargo.toml | 11 +++++- transports/uds/Cargo.toml | 4 +- transports/webrtc-websys/Cargo.toml | 19 ++++++++- transports/webrtc/Cargo.toml | 2 +- 31 files changed, 343 insertions(+), 65 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9785f3c8910..61fb1e125d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,4 +134,4 @@ libp2p-identity = { path = "identity" } rust.unreachable_pub = "warn" clippy.used_underscore_binding = "warn" clippy.pedantic = "allow" -clippy.type_complexity = "allow" +clippy.type_complexity = "allow" \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index 66eaf8fef6a..c77e535686a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -35,9 +35,9 @@ void = "1" [dev-dependencies] async-std = { version = "1.6.2", features = ["attributes"] } -libp2p-mplex = { path = "../muxers/mplex" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -multihash = { workspace = true , features = ["arb"] } +libp2p-mplex = { path = "../muxers/mplex" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +multihash = { workspace = true, features = ["arb"] } quickcheck = { workspace = true } libp2p-identity = { workspace = true, features = ["ed25519"] } diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index cead85850fc..823413e524c 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -10,7 +10,15 @@ async-std = { version = "1.12", features = ["attributes"] } clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "tcp", + "noise", + "yamux", + "autonat", + "identify", + "macros", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index 83d110c359f..3a3e96f69c7 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -21,9 +21,18 @@ rand = "0.8" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] axum = "0.6.19" -libp2p = { path = "../../libp2p", features = ["ed25519", "macros", "ping", "wasm-bindgen", "tokio"] } +libp2p = { path = "../../libp2p", features = [ + "ed25519", + "macros", + "ping", + "wasm-bindgen", + "tokio", +] } libp2p-webrtc = { workspace = true, features = ["tokio"] } -rust-embed = { version = "8.0.0", features = ["include-exclude", "interpolate-folder-path"] } +rust-embed = { version = "8.0.0", features = [ + "include-exclude", + "interpolate-folder-path", +] } tokio = { version = "1.29", features = ["macros", "net", "rt", "signal"] } tokio-util = { version = "0.7", features = ["compat"] } tower = "0.4" @@ -32,12 +41,24 @@ mime_guess = "2.0.4" [target.'cfg(target_arch = "wasm32")'.dependencies] js-sys = "0.3.64" -libp2p = { path = "../../libp2p", features = ["ed25519", "macros", "ping", "wasm-bindgen"] } +libp2p = { path = "../../libp2p", features = [ + "ed25519", + "macros", + "ping", + "wasm-bindgen", +] } libp2p-webrtc-websys = { workspace = true } wasm-bindgen = "0.2.84" wasm-bindgen-futures = "0.4.37" wasm-logger = { version = "0.2.0" } -web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] } +web-sys = { version = "0.3", features = [ + 'Document', + 'Element', + 'HtmlElement', + 'Node', + 'Response', + 'Window', +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index e8541d5bf53..864233243bb 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -10,7 +10,16 @@ tokio = { version = "1.32", features = ["full"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["tokio", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux", "quic"] } +libp2p = { path = "../../libp2p", features = [ + "tokio", + "gossipsub", + "mdns", + "noise", + "macros", + "tcp", + "yamux", + "quic", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 3195c829f53..726d194d7c4 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -10,7 +10,21 @@ clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" futures-timer = "3.0" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "quic", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "dcutr", + "identify", + "macros", + "noise", + "ping", + "quic", + "relay", + "rendezvous", + "tcp", + "tokio", + "yamux", +] } log = "0.4" [lints] diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index 1689dec3000..a0a27940679 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -10,7 +10,17 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "kad", + "mdns", + "noise", + "macros", + "tcp", + "websocket", + "yamux", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 247a78f83f3..c4f55f81449 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -12,7 +12,18 @@ clap = { version = "4.3.23", features = ["derive"] } either = "1.9" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "cbor", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "cbor", + "dns", + "kad", + "noise", + "macros", + "request-response", + "tcp", + "websocket", + "yamux", +] } void = "1.0.2" [lints] diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index 241616281f9..78a419697e4 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -10,7 +10,20 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "dcutr", + "identify", + "macros", + "noise", + "ping", + "relay", + "rendezvous", + "tcp", + "tokio", + "yamux", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index c333c346bec..44aff784400 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,7 +10,16 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "kad", + "noise", + "tcp", + "websocket", + "yamux", + "rsa", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index 09fc790a3fc..a5a1d27b089 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -11,7 +11,20 @@ async-trait = "0.1" either = "1.9" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "gossipsub", + "dns", + "identify", + "kad", + "macros", + "noise", + "ping", + "pnet", + "tcp", + "websocket", + "yamux", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index b6edcabba90..952a4af6d83 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -9,7 +9,16 @@ license = "MIT" env_logger = "0.10.0" futures = "0.3.27" hyper = { version = "0.14", features = ["server", "tcp", "http1"] } -libp2p = { path = "../../libp2p", features = ["async-std", "metrics", "ping", "noise", "identify", "tcp", "yamux", "macros"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "metrics", + "ping", + "noise", + "identify", + "tcp", + "yamux", + "macros", +] } log = "0.4.20" tokio = { version = "1", features = ["rt-multi-thread"] } prometheus-client = "0.21.2" diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index d3595e909ab..7d7ccb10a64 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -10,7 +10,16 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "dns", + "macros", + "noise", + "ping", + "tcp", + "websocket", + "yamux", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 74f31a13929..061245d6152 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -11,7 +11,17 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay", "quic"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "noise", + "macros", + "ping", + "tcp", + "identify", + "yamux", + "relay", + "quic", +] } [lints] workspace = true \ No newline at end of file diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index 14286a95c8a..c6cd2b2e3bf 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -10,9 +10,19 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } +libp2p = { path = "../../libp2p", features = [ + "async-std", + "identify", + "macros", + "noise", + "ping", + "rendezvous", + "tcp", + "tokio", + "yamux", +] } log = "0.4" -tokio = { version = "1.32", features = [ "rt-multi-thread", "macros", "time" ] } +tokio = { version = "1.32", features = ["rt-multi-thread", "macros", "time"] } [lints] workspace = true \ No newline at end of file diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index f1c775db7a5..8725b79e350 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -6,9 +6,19 @@ publish = false license = "MIT" [dependencies] -tokio = { version = "1", features = [ "rt-multi-thread", "macros"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros"] } futures = "0.3.28" -libp2p = { path = "../../libp2p", features = ["tokio", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux", "upnp"] } +libp2p = { path = "../../libp2p", features = [ + "tokio", + "dns", + "macros", + "noise", + "ping", + "tcp", + "websocket", + "yamux", + "upnp", +] } [lints] workspace = true \ No newline at end of file diff --git a/identity/Cargo.toml b/identity/Cargo.toml index d00122c54cb..b8ac537e3d9 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -18,7 +18,11 @@ ed25519-dalek = { version = "2.0", optional = true, features = ["rand_core"] } libsecp256k1 = { version = "0.7.0", optional = true } log = "0.4" multihash = { version = "0.19.1", optional = true } -p256 = { version = "0.13", default-features = false, features = ["ecdsa", "std", "pem"], optional = true } +p256 = { version = "0.13", default-features = false, features = [ + "ecdsa", + "std", + "pem", +], optional = true } quick-protobuf = "0.8.1" rand = { version = "0.8", optional = true } sec1 = { version = "0.7", default-features = false, optional = true } @@ -29,14 +33,23 @@ void = { version = "1.0", optional = true } zeroize = { version = "1.6", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false, optional = true} +ring = { version = "0.16.9", features = [ + "alloc", + "std", +], default-features = false, optional = true } [features] -secp256k1 = [ "dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:zeroize" ] -ecdsa = [ "dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1" ] -rsa = [ "dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize" ] -ed25519 = [ "dep:ed25519-dalek", "dep:rand", "dep:zeroize" ] -peerid = [ "dep:multihash", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2" ] +secp256k1 = [ + "dep:libsecp256k1", + "dep:asn1_der", + "dep:rand", + "dep:sha2", + "dep:zeroize", +] +ecdsa = ["dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1"] +rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize"] +ed25519 = ["dep:ed25519-dalek", "dep:rand", "dep:zeroize"] +peerid = ["dep:multihash", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2"] [dev-dependencies] quickcheck = { workspace = true } diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 7de1b15623b..046c5385616 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -19,11 +19,26 @@ rand = "0.8.5" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] axum = "0.6" -libp2p = { path = "../libp2p", features = ["ping", "noise", "tls", "rsa", "macros", "websocket", "tokio", "yamux", "tcp", "dns", "identify", "quic"] } +libp2p = { path = "../libp2p", features = [ + "ping", + "noise", + "tls", + "rsa", + "macros", + "websocket", + "tokio", + "yamux", + "tcp", + "dns", + "identify", + "quic", +] } libp2p-webrtc = { workspace = true, features = ["tokio"] } libp2p-mplex = { path = "../muxers/mplex" } mime_guess = "2.0" -redis = { version = "0.23.3", default-features = false, features = ["tokio-comp"] } +redis = { version = "0.23.3", default-features = false, features = [ + "tokio-comp", +] } rust-embed = "8.0" serde_json = "1" thirtyfour = "=0.32.0-rc.8" # https://github.com/stevepryde/thirtyfour/issues/169 @@ -33,7 +48,13 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } [target.'cfg(target_arch = "wasm32")'.dependencies] -libp2p = { path = "../libp2p", features = ["ping", "macros", "webtransport-websys", "wasm-bindgen", "identify"] } +libp2p = { path = "../libp2p", features = [ + "ping", + "macros", + "webtransport-websys", + "wasm-bindgen", + "identify", +] } libp2p-webrtc-websys = { workspace = true } wasm-bindgen = { version = "0.2" } wasm-bindgen-futures = { version = "0.4" } @@ -44,4 +65,4 @@ console_error_panic_hook = { version = "0.1.7" } futures-timer = "3.0.2" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 2eb16483d47..bc19b905b38 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -50,10 +50,16 @@ full = [ "websocket", "webtransport-websys", "yamux", - "upnp" + "upnp", ] -async-std = ["libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std", "libp2p-quic?/async-std"] +async-std = [ + "libp2p-swarm/async-std", + "libp2p-mdns?/async-io", + "libp2p-tcp?/async-io", + "libp2p-dns?/async-std", + "libp2p-quic?/async-std", +] autonat = ["dep:libp2p-autonat"] cbor = ["libp2p-request-response?/cbor"] dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] @@ -83,9 +89,22 @@ secp256k1 = ["libp2p-identity/secp256k1"] serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] tcp = ["dep:libp2p-tcp"] tls = ["dep:libp2p-tls"] -tokio = ["libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-upnp?/tokio"] +tokio = [ + "libp2p-swarm/tokio", + "libp2p-mdns?/tokio", + "libp2p-tcp?/tokio", + "libp2p-dns?/tokio", + "libp2p-quic?/tokio", + "libp2p-upnp?/tokio", +] uds = ["dep:libp2p-uds"] -wasm-bindgen = ["futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen", "libp2p-gossipsub?/wasm-bindgen"] +wasm-bindgen = [ + "futures-timer/wasm-bindgen", + "instant/wasm-bindgen", + "getrandom/js", + "libp2p-swarm/wasm-bindgen", + "libp2p-gossipsub?/wasm-bindgen", +] wasm-ext = ["dep:libp2p-wasm-ext"] wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] websocket = ["dep:libp2p-websocket"] @@ -97,8 +116,8 @@ upnp = ["dep:libp2p-upnp"] bytes = "1" futures = "0.3.26" futures-timer = "3.0.2" # Explicit dependency to be used in `wasm-bindgen` feature -getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature -instant = "0.1.12" # Explicit dependency to be used in `wasm-bindgen` feature +getrandom = "0.2.3" # Explicit dependency to be used in `wasm-bindgen` feature +instant = "0.1.12" # Explicit dependency to be used in `wasm-bindgen` feature libp2p-allow-block-list = { workspace = true } libp2p-autonat = { workspace = true, optional = true } @@ -144,7 +163,13 @@ async-trait = "0.1" either = "1.8.0" env_logger = "0.10.0" clap = { version = "4.1.6", features = ["derive"] } -tokio = { version = "1.15", features = ["io-util", "io-std", "macros", "rt", "rt-multi-thread"] } +tokio = { version = "1.15", features = [ + "io-util", + "io-std", + "macros", + "rt", + "rt-multi-thread", +] } libp2p-noise = { workspace = true } libp2p-tcp = { workspace = true, features = ["tokio"] } diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index 85bdda2c232..a459a51e2b9 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -4,7 +4,10 @@ edition = "2021" rust-version = { workspace = true } description = "NAT and firewall detection for libp2p" version = "0.11.0" -authors = ["David Craven ", "Elena Frank "] +authors = [ + "David Craven ", + "Elena Frank ", +] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index 1c8dbf0557d..23cd195f226 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -16,7 +16,13 @@ proc-macro = true [dependencies] heck = "0.4" quote = "1.0" -syn = { version = "2.0.37", default-features = false, features = ["clone-impls", "derive", "parsing", "printing", "proc-macro"] } +syn = { version = "2.0.37", default-features = false, features = [ + "clone-impls", + "derive", + "parsing", + "printing", + "proc-macro", +] } proc-macro-warning = "0.4.2" proc-macro2 = "1.0" diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index 77f7fcd9aae..697b099e511 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -24,7 +24,9 @@ rand = "0.8" smallvec = "1.11.1" void = "1" wasm-bindgen-futures = { version = "0.4.37", optional = true } -getrandom = { version = "0.2.9", features = ["js"], optional = true } # Explicit dependency to be used in `wasm-bindgen` feature +getrandom = { version = "0.2.9", features = [ + "js", +], optional = true } # Explicit dependency to be used in `wasm-bindgen` feature once_cell = "1.18.0" multistream-select = { workspace = true } @@ -43,14 +45,14 @@ async-std = { version = "1.6.2", features = ["attributes"] } either = "1.9.0" env_logger = "0.10" futures = "0.3.28" -libp2p-identify = { path = "../protocols/identify" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-identify = { path = "../protocols/identify" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. libp2p-identity = { workspace = true, features = ["ed25519"] } -libp2p-kad = { path = "../protocols/kad" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-ping = { path = "../protocols/ping" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-plaintext = { path = "../transports/plaintext" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-swarm-derive = { path = "../swarm-derive" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-swarm-test = { path = "../swarm-test" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. -libp2p-yamux = { path = "../muxers/yamux" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-kad = { path = "../protocols/kad" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-ping = { path = "../protocols/ping" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-plaintext = { path = "../transports/plaintext" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-swarm-derive = { path = "../swarm-derive" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-swarm-test = { path = "../swarm-test" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. +libp2p-yamux = { path = "../muxers/yamux" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing. quickcheck = { workspace = true } void = "1" once_cell = "1.18.0" diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index eb93694beae..2988b498b64 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -18,12 +18,17 @@ log = "0.4.20" futures = "0.3.28" async-std-resolver = { version = "0.23", optional = true } parking_lot = "0.12.0" -trust-dns-resolver = { version = "0.23", default-features = false, features = ["system-config"] } +trust-dns-resolver = { version = "0.23", default-features = false, features = [ + "system-config", +] } smallvec = "1.11.1" [dev-dependencies] env_logger = "0.10" -tokio-crate = { package = "tokio", version = "1.0", default-features = false, features = ["rt", "time"] } +tokio-crate = { package = "tokio", version = "1.0", default-features = false, features = [ + "rt", + "time", +] } async-std-crate = { package = "async-std", version = "1.6" } [features] @@ -33,7 +38,10 @@ tokio = ["trust-dns-resolver/tokio-runtime"] # since these features of `trust-dns-resolver` are currently only # available for `tokio`. tokio-dns-over-rustls = ["tokio", "trust-dns-resolver/dns-over-rustls"] -tokio-dns-over-https-rustls = ["tokio", "trust-dns-resolver/dns-over-https-rustls"] +tokio-dns-over-https-rustls = [ + "tokio", + "trust-dns-resolver/dns-over-https-rustls", +] # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index 19b4fbde51c..b0f9a731bbd 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -27,10 +27,14 @@ x25519-dalek = "1.1.0" zeroize = "1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -snow = { version = "0.9.2", features = ["ring-resolver"], default-features = false } +snow = { version = "0.9.2", features = [ + "ring-resolver", +], default-features = false } [target.'cfg(target_arch = "wasm32")'.dependencies] -snow = { version = "0.9.2", features = ["default-resolver"], default-features = false } +snow = { version = "0.9.2", features = [ + "default-resolver", +], default-features = false } [dev-dependencies] env_logger = "0.10.0" diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 667f4111085..609a6928b91 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -20,7 +20,12 @@ pin-project = "1.1.3" [dev-dependencies] libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "ecdsa", "secp256k1"] } +libp2p-identity = { workspace = true, features = [ + "ed25519", + "rsa", + "ecdsa", + "secp256k1", +] } libp2p-noise = { workspace = true } libp2p-swarm = { workspace = true, features = ["tokio"] } libp2p-tcp = { workspace = true, features = ["tokio"] } diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 08a5b756332..9f6d156a43c 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -19,11 +19,18 @@ libp2p-tls = { workspace = true } libp2p-identity = { workspace = true } log = "0.4" parking_lot = "0.12.0" -quinn = { version = "0.10.2", default-features = false, features = ["tls-rustls", "futures-io"] } +quinn = { version = "0.10.2", default-features = false, features = [ + "tls-rustls", + "futures-io", +] } rand = "0.8.5" rustls = { version = "0.21.7", default-features = false } thiserror = "1.0.48" -tokio = { version = "1.32.0", default-features = false, features = ["net", "rt", "time"], optional = true } +tokio = { version = "1.32.0", default-features = false, features = [ + "net", + "rt", + "time", +], optional = true } socket2 = "0.5.4" [features] diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 745a31a098a..293924efcae 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -20,7 +20,9 @@ libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4.20" socket2 = { version = "0.5.4", features = ["all"] } -tokio = { version = "1.32.0", default-features = false, features = ["net"], optional = true } +tokio = { version = "1.32.0", default-features = false, features = [ + "net", +], optional = true } [features] tokio = ["dep:tokio", "if-watch/tokio"] diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index 7cf12ad4d46..dc0e0a222c1 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -24,13 +24,20 @@ yasna = "0.5.2" [dependencies.rustls] version = "0.21.7" default-features = false -features = ["dangerous_configuration"] # Must enable this to allow for custom verification code. +features = [ + "dangerous_configuration", +] # Must enable this to allow for custom verification code. [dev-dependencies] hex = "0.4.3" hex-literal = "0.4.1" libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "secp256k1", "ecdsa"] } +libp2p-identity = { workspace = true, features = [ + "ed25519", + "rsa", + "secp256k1", + "ecdsa", +] } libp2p-swarm = { workspace = true } libp2p-yamux = { workspace = true } tokio = { version = "1.32.0", features = ["full"] } diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 31bdaafef43..754c7cf885b 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -15,7 +15,9 @@ async-std = { version = "1.6.2", optional = true } libp2p-core = { workspace = true } log = "0.4.20" futures = "0.3.28" -tokio = { version = "1.32", default-features = false, features = ["net"], optional = true } +tokio = { version = "1.32", default-features = false, features = [ + "net", +], optional = true } [dev-dependencies] tempfile = "3.8" diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 6773058c86a..73a15fd8d2f 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -28,7 +28,24 @@ serde = { version = "1.0", features = ["derive"] } thiserror = "1" wasm-bindgen = { version = "0.2.87" } wasm-bindgen-futures = { version = "0.4.37" } -web-sys = { version = "0.3.64", features = ["Document", "Location", "MessageEvent", "Navigator", "RtcCertificate", "RtcConfiguration", "RtcDataChannel", "RtcDataChannelEvent", "RtcDataChannelInit", "RtcDataChannelState", "RtcDataChannelType", "RtcPeerConnection", "RtcSdpType", "RtcSessionDescription", "RtcSessionDescriptionInit", "Window"] } +web-sys = { version = "0.3.64", features = [ + "Document", + "Location", + "MessageEvent", + "Navigator", + "RtcCertificate", + "RtcConfiguration", + "RtcDataChannel", + "RtcDataChannelEvent", + "RtcDataChannelInit", + "RtcDataChannelState", + "RtcDataChannelType", + "RtcPeerConnection", + "RtcSdpType", + "RtcSessionDescription", + "RtcSessionDescriptionInit", + "Window", +] } [dev-dependencies] hex-literal = "0.4" diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index fd7b5890162..f26cd211eb3 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -29,7 +29,7 @@ serde = { version = "1.0", features = ["derive"] } stun = "0.5" thiserror = "1" tinytemplate = "1.2" -tokio = { version = "1.32", features = ["net"], optional = true} +tokio = { version = "1.32", features = ["net"], optional = true } tokio-util = { version = "0.7", features = ["compat"], optional = true } webrtc = { version = "0.9.0", optional = true } From 1bee497f08718278c304da274873a638885422fc Mon Sep 17 00:00:00 2001 From: binsta Date: Tue, 3 Oct 2023 04:40:54 +0530 Subject: [PATCH 05/14] fix: merge conflicts --- examples/autonat/Cargo.toml | 10 +--------- identity/Cargo.toml | 8 +------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index 823413e524c..cead85850fc 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -10,15 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "tcp", - "noise", - "yamux", - "autonat", - "identify", - "macros", -] } +libp2p = { path = "../../libp2p", features = ["async-std", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } [lints] workspace = true \ No newline at end of file diff --git a/identity/Cargo.toml b/identity/Cargo.toml index b8ac537e3d9..74531296c72 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -39,13 +39,7 @@ ring = { version = "0.16.9", features = [ ], default-features = false, optional = true } [features] -secp256k1 = [ - "dep:libsecp256k1", - "dep:asn1_der", - "dep:rand", - "dep:sha2", - "dep:zeroize", -] +secp256k1 = ["dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:zeroize"] ecdsa = ["dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1"] rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize"] ed25519 = ["dep:ed25519-dalek", "dep:rand", "dep:zeroize"] From 08050c1d4c36b880075be877c4826d92ffeb8274 Mon Sep 17 00:00:00 2001 From: binsta Date: Tue, 3 Oct 2023 04:58:59 +0530 Subject: [PATCH 06/14] fix: newlines at the end of files --- Cargo.toml | 2 +- core/Cargo.toml | 2 +- examples/autonat/Cargo.toml | 2 +- examples/browser-webrtc/Cargo.toml | 2 +- examples/chat/Cargo.toml | 2 +- examples/dcutr/Cargo.toml | 2 +- examples/distributed-key-value-store/Cargo.toml | 2 +- examples/file-sharing/Cargo.toml | 2 +- examples/identify/Cargo.toml | 2 +- examples/ipfs-kad/Cargo.toml | 2 +- examples/ipfs-private/Cargo.toml | 2 +- examples/metrics/Cargo.toml | 2 +- examples/ping/Cargo.toml | 2 +- examples/relay-server/Cargo.toml | 2 +- examples/rendezvous/Cargo.toml | 2 +- examples/upnp/Cargo.toml | 2 +- identity/Cargo.toml | 2 +- libp2p/Cargo.toml | 2 +- misc/allow-block-list/Cargo.toml | 2 +- misc/connection-limits/Cargo.toml | 2 +- misc/futures-bounded/Cargo.toml | 2 +- misc/keygen/Cargo.toml | 2 +- misc/memory-connection-limits/Cargo.toml | 2 +- misc/metrics/Cargo.toml | 2 +- misc/multistream-select/Cargo.toml | 2 +- misc/quick-protobuf-codec/Cargo.toml | 2 +- misc/quickcheck-ext/Cargo.toml | 2 +- misc/rw-stream-sink/Cargo.toml | 2 +- misc/server/Cargo.toml | 2 +- misc/webrtc-utils/Cargo.toml | 2 +- muxers/mplex/Cargo.toml | 2 +- muxers/test-harness/Cargo.toml | 2 +- muxers/yamux/Cargo.toml | 2 +- protocols/autonat/Cargo.toml | 2 +- protocols/dcutr/Cargo.toml | 2 +- protocols/floodsub/Cargo.toml | 2 +- protocols/gossipsub/Cargo.toml | 2 +- protocols/identify/Cargo.toml | 2 +- protocols/kad/Cargo.toml | 2 +- protocols/mdns/Cargo.toml | 2 +- protocols/perf/Cargo.toml | 2 +- protocols/ping/Cargo.toml | 2 +- protocols/relay/Cargo.toml | 2 +- protocols/rendezvous/Cargo.toml | 2 +- protocols/request-response/Cargo.toml | 2 +- protocols/upnp/Cargo.toml | 2 +- swarm-derive/Cargo.toml | 2 +- swarm-test/Cargo.toml | 2 +- swarm/Cargo.toml | 2 +- transports/deflate/Cargo.toml | 2 +- transports/dns/Cargo.toml | 2 +- transports/noise/Cargo.toml | 2 +- transports/plaintext/Cargo.toml | 2 +- transports/pnet/Cargo.toml | 2 +- transports/quic/Cargo.toml | 2 +- transports/tcp/Cargo.toml | 2 +- transports/tls/Cargo.toml | 2 +- transports/uds/Cargo.toml | 2 +- transports/wasm-ext/Cargo.toml | 2 +- transports/webrtc-websys/Cargo.toml | 2 +- transports/webrtc/Cargo.toml | 2 +- transports/websocket/Cargo.toml | 2 +- transports/webtransport-websys/Cargo.toml | 2 +- wasm-tests/webtransport-tests/Cargo.toml | 2 +- 64 files changed, 64 insertions(+), 64 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 61fb1e125d4..9785f3c8910 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,4 +134,4 @@ libp2p-identity = { path = "identity" } rust.unreachable_pub = "warn" clippy.used_underscore_binding = "warn" clippy.pedantic = "allow" -clippy.type_complexity = "allow" \ No newline at end of file +clippy.type_complexity = "allow" diff --git a/core/Cargo.toml b/core/Cargo.toml index c77e535686a..15288a48d1c 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -52,4 +52,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/autonat/Cargo.toml b/examples/autonat/Cargo.toml index cead85850fc..0798c4e3086 100644 --- a/examples/autonat/Cargo.toml +++ b/examples/autonat/Cargo.toml @@ -13,4 +13,4 @@ futures = "0.3.28" libp2p = { path = "../../libp2p", features = ["async-std", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index 3a3e96f69c7..e2a149deb82 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -61,4 +61,4 @@ web-sys = { version = "0.3", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index 864233243bb..c48a7047bd1 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -22,4 +22,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index 726d194d7c4..b44ab7ffe7a 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -28,4 +28,4 @@ libp2p = { path = "../../libp2p", features = [ log = "0.4" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index a0a27940679..3c289b13f0b 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -23,4 +23,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index c4f55f81449..4b6325c5fe1 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -27,4 +27,4 @@ libp2p = { path = "../../libp2p", features = [ void = "1.0.2" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index 78a419697e4..2aa88fb0a0f 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -26,4 +26,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 44aff784400..29f0ea54051 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -22,4 +22,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index a5a1d27b089..f616fa1164d 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -27,4 +27,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index 952a4af6d83..10c49556e83 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -24,4 +24,4 @@ tokio = { version = "1", features = ["rt-multi-thread"] } prometheus-client = "0.21.2" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 7d7ccb10a64..0ec6905719c 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -22,4 +22,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 061245d6152..517b5d4a457 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -24,4 +24,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index c6cd2b2e3bf..479844e93a3 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -25,4 +25,4 @@ log = "0.4" tokio = { version = "1.32", features = ["rt-multi-thread", "macros", "time"] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index 8725b79e350..7b68e8b0a84 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -21,4 +21,4 @@ libp2p = { path = "../../libp2p", features = [ ] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/identity/Cargo.toml b/identity/Cargo.toml index 74531296c72..03217059133 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -65,4 +65,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index bc19b905b38..0b4b937f565 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -182,4 +182,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/allow-block-list/Cargo.toml b/misc/allow-block-list/Cargo.toml index 5a40d65907c..84125f0c0a7 100644 --- a/misc/allow-block-list/Cargo.toml +++ b/misc/allow-block-list/Cargo.toml @@ -21,4 +21,4 @@ libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-test = { path = "../../swarm-test" } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/connection-limits/Cargo.toml b/misc/connection-limits/Cargo.toml index c7cdae2d246..1ba551470a0 100644 --- a/misc/connection-limits/Cargo.toml +++ b/misc/connection-limits/Cargo.toml @@ -25,4 +25,4 @@ quickcheck = { workspace = true } rand = "0.8.5" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/futures-bounded/Cargo.toml b/misc/futures-bounded/Cargo.toml index b9191e957a6..4d70779e282 100644 --- a/misc/futures-bounded/Cargo.toml +++ b/misc/futures-bounded/Cargo.toml @@ -20,4 +20,4 @@ futures-timer = "3.0.2" tokio = { version = "1.29.1", features = ["macros", "rt"] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/keygen/Cargo.toml b/misc/keygen/Cargo.toml index e25c01d4e6f..da3e4a14395 100644 --- a/misc/keygen/Cargo.toml +++ b/misc/keygen/Cargo.toml @@ -19,4 +19,4 @@ base64 = "0.21.4" libp2p-identity = { workspace = true } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/memory-connection-limits/Cargo.toml b/misc/memory-connection-limits/Cargo.toml index 8430c02b2a2..eb65d26ac66 100644 --- a/misc/memory-connection-limits/Cargo.toml +++ b/misc/memory-connection-limits/Cargo.toml @@ -26,4 +26,4 @@ libp2p-swarm-test = { path = "../../swarm-test" } rand = "0.8.5" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/metrics/Cargo.toml b/misc/metrics/Cargo.toml index a2967f7e5db..0cb9840955b 100644 --- a/misc/metrics/Cargo.toml +++ b/misc/metrics/Cargo.toml @@ -40,4 +40,4 @@ rustc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/multistream-select/Cargo.toml b/misc/multistream-select/Cargo.toml index d0f3ef38d8a..6bd072070e7 100644 --- a/misc/multistream-select/Cargo.toml +++ b/misc/multistream-select/Cargo.toml @@ -34,4 +34,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/quick-protobuf-codec/Cargo.toml b/misc/quick-protobuf-codec/Cargo.toml index e0d817a9a28..0f793d1f185 100644 --- a/misc/quick-protobuf-codec/Cargo.toml +++ b/misc/quick-protobuf-codec/Cargo.toml @@ -25,4 +25,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/quickcheck-ext/Cargo.toml b/misc/quickcheck-ext/Cargo.toml index 23b8800cc7e..65e45e47ab8 100644 --- a/misc/quickcheck-ext/Cargo.toml +++ b/misc/quickcheck-ext/Cargo.toml @@ -10,4 +10,4 @@ quickcheck = "1" num-traits = "0.2" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/rw-stream-sink/Cargo.toml b/misc/rw-stream-sink/Cargo.toml index 6dc6b291c48..f1537e9e7ac 100644 --- a/misc/rw-stream-sink/Cargo.toml +++ b/misc/rw-stream-sink/Cargo.toml @@ -26,4 +26,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/server/Cargo.toml b/misc/server/Cargo.toml index 33fce777ddd..e0d7af3a823 100644 --- a/misc/server/Cargo.toml +++ b/misc/server/Cargo.toml @@ -27,4 +27,4 @@ tokio = { version = "1", features = ["rt-multi-thread", "macros"] } zeroize = "1" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/misc/webrtc-utils/Cargo.toml b/misc/webrtc-utils/Cargo.toml index 349f3d4c80d..f86057a8324 100644 --- a/misc/webrtc-utils/Cargo.toml +++ b/misc/webrtc-utils/Cargo.toml @@ -32,4 +32,4 @@ hex-literal = "0.4" unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/muxers/mplex/Cargo.toml b/muxers/mplex/Cargo.toml index a5495ccba0b..aca3ec6eadf 100644 --- a/muxers/mplex/Cargo.toml +++ b/muxers/mplex/Cargo.toml @@ -45,4 +45,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/muxers/test-harness/Cargo.toml b/muxers/test-harness/Cargo.toml index 94ac486c27b..5304509b9cc 100644 --- a/muxers/test-harness/Cargo.toml +++ b/muxers/test-harness/Cargo.toml @@ -15,4 +15,4 @@ futures-timer = "3.0.2" futures_ringbuf = "0.4.0" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/muxers/yamux/Cargo.toml b/muxers/yamux/Cargo.toml index 2a401388e1e..3073c040ff3 100644 --- a/muxers/yamux/Cargo.toml +++ b/muxers/yamux/Cargo.toml @@ -29,4 +29,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index a459a51e2b9..a9bdb621b41 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -39,4 +39,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/dcutr/Cargo.toml b/protocols/dcutr/Cargo.toml index 1f38cff57ca..f12684816c6 100644 --- a/protocols/dcutr/Cargo.toml +++ b/protocols/dcutr/Cargo.toml @@ -49,4 +49,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/floodsub/Cargo.toml b/protocols/floodsub/Cargo.toml index af3796f8fc3..7a17fe7d2b7 100644 --- a/protocols/floodsub/Cargo.toml +++ b/protocols/floodsub/Cargo.toml @@ -33,4 +33,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/gossipsub/Cargo.toml b/protocols/gossipsub/Cargo.toml index fe718e2b9bb..8700dd38f66 100644 --- a/protocols/gossipsub/Cargo.toml +++ b/protocols/gossipsub/Cargo.toml @@ -60,4 +60,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index f07e6427a8c..37b94b28f6c 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -41,4 +41,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/kad/Cargo.toml b/protocols/kad/Cargo.toml index 3e98b474066..d6cb5235cf9 100644 --- a/protocols/kad/Cargo.toml +++ b/protocols/kad/Cargo.toml @@ -56,4 +56,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/mdns/Cargo.toml b/protocols/mdns/Cargo.toml index 76c5eaff71d..da2c0c93241 100644 --- a/protocols/mdns/Cargo.toml +++ b/protocols/mdns/Cargo.toml @@ -57,4 +57,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/perf/Cargo.toml b/protocols/perf/Cargo.toml index fb6d3a25cd6..50ca36a99e2 100644 --- a/protocols/perf/Cargo.toml +++ b/protocols/perf/Cargo.toml @@ -45,4 +45,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/ping/Cargo.toml b/protocols/ping/Cargo.toml index 9b2840ef75d..a15407b2840 100644 --- a/protocols/ping/Cargo.toml +++ b/protocols/ping/Cargo.toml @@ -37,4 +37,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/relay/Cargo.toml b/protocols/relay/Cargo.toml index 86d0a00842b..03799a8c77c 100644 --- a/protocols/relay/Cargo.toml +++ b/protocols/relay/Cargo.toml @@ -45,4 +45,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/rendezvous/Cargo.toml b/protocols/rendezvous/Cargo.toml index 84b0151ab09..c3912b78ddf 100644 --- a/protocols/rendezvous/Cargo.toml +++ b/protocols/rendezvous/Cargo.toml @@ -48,4 +48,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/request-response/Cargo.toml b/protocols/request-response/Cargo.toml index 579f73ee23e..b87048bb629 100644 --- a/protocols/request-response/Cargo.toml +++ b/protocols/request-response/Cargo.toml @@ -48,4 +48,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/protocols/upnp/Cargo.toml b/protocols/upnp/Cargo.toml index ec6667035a5..9367f0d6317 100644 --- a/protocols/upnp/Cargo.toml +++ b/protocols/upnp/Cargo.toml @@ -24,4 +24,4 @@ tokio = { version = "1.29", default-features = false, features = ["rt"], optiona tokio = ["igd-next/aio_tokio", "dep:tokio"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index 23cd195f226..2612ef10a80 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -34,4 +34,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/swarm-test/Cargo.toml b/swarm-test/Cargo.toml index 82d021ff8da..8c953b2b52f 100644 --- a/swarm-test/Cargo.toml +++ b/swarm-test/Cargo.toml @@ -25,4 +25,4 @@ rand = "0.8.5" futures-timer = "3.0.2" [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index 697b099e511..79332841d87 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -71,4 +71,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/deflate/Cargo.toml b/transports/deflate/Cargo.toml index 7f4471ac9ab..9e2e1f4e029 100644 --- a/transports/deflate/Cargo.toml +++ b/transports/deflate/Cargo.toml @@ -30,4 +30,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index 2988b498b64..19fefc890e0 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -51,4 +51,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index b0f9a731bbd..fa94538fa85 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -49,4 +49,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/plaintext/Cargo.toml b/transports/plaintext/Cargo.toml index 70f8ac35fee..f58fefb44ca 100644 --- a/transports/plaintext/Cargo.toml +++ b/transports/plaintext/Cargo.toml @@ -35,4 +35,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 609a6928b91..68a87993607 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -42,4 +42,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 9f6d156a43c..f800cb5682a 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -59,4 +59,4 @@ name = "stream_compliance" required-features = ["async-std"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 293924efcae..f279660c1ee 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -42,4 +42,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index dc0e0a222c1..c5cc801320a 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -50,4 +50,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 754c7cf885b..994dd0f8faf 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -30,4 +30,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/wasm-ext/Cargo.toml b/transports/wasm-ext/Cargo.toml index 64f989fbeb3..6d5ed8e229c 100644 --- a/transports/wasm-ext/Cargo.toml +++ b/transports/wasm-ext/Cargo.toml @@ -29,4 +29,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 73a15fd8d2f..fd84136a0ae 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -53,4 +53,4 @@ libp2p-ping = { workspace = true } libp2p-swarm = { workspace = true, features = ["wasm-bindgen"] } [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/webrtc/Cargo.toml b/transports/webrtc/Cargo.toml index f26cd211eb3..8a8c928a775 100644 --- a/transports/webrtc/Cargo.toml +++ b/transports/webrtc/Cargo.toml @@ -47,4 +47,4 @@ name = "smoke" required-features = ["tokio"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index 7c6ba16743b..62a5129cbfa 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -38,4 +38,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/transports/webtransport-websys/Cargo.toml b/transports/webtransport-websys/Cargo.toml index df56e53b41a..3f63ea4cfce 100644 --- a/transports/webtransport-websys/Cargo.toml +++ b/transports/webtransport-websys/Cargo.toml @@ -48,4 +48,4 @@ rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/wasm-tests/webtransport-tests/Cargo.toml b/wasm-tests/webtransport-tests/Cargo.toml index 8342e91d7e4..8d3f756ecb7 100644 --- a/wasm-tests/webtransport-tests/Cargo.toml +++ b/wasm-tests/webtransport-tests/Cargo.toml @@ -20,4 +20,4 @@ wasm-bindgen-test = "0.3.37" web-sys = { version = "0.3.64", features = ["Response", "Window"] } [lints] -workspace = true \ No newline at end of file +workspace = true From 87a45c8bf6d7f15f0f5147723836ab80aeb6b54c Mon Sep 17 00:00:00 2001 From: binsta Date: Tue, 3 Oct 2023 06:10:39 +0530 Subject: [PATCH 07/14] fix: formatting on Cargo.toml & deleted .cargo folder --- .cargo/config.toml | 3 -- Cargo.toml | 1 - examples/browser-webrtc/Cargo.toml | 29 +++------------- examples/chat/Cargo.toml | 11 +------ examples/dcutr/Cargo.toml | 16 +-------- .../distributed-key-value-store/Cargo.toml | 12 +------ examples/file-sharing/Cargo.toml | 13 +------- examples/identify/Cargo.toml | 15 +-------- examples/ipfs-kad/Cargo.toml | 11 +------ examples/ipfs-private/Cargo.toml | 15 +-------- examples/metrics/Cargo.toml | 11 +------ examples/ping/Cargo.toml | 11 +------ examples/relay-server/Cargo.toml | 12 +------ examples/rendezvous/Cargo.toml | 12 +------ examples/upnp/Cargo.toml | 12 +------ identity/Cargo.toml | 11 ++----- interop-tests/Cargo.toml | 23 ++----------- libp2p/Cargo.toml | 33 +++---------------- transports/dns/Cargo.toml | 14 ++------ transports/noise/Cargo.toml | 8 ++--- transports/pnet/Cargo.toml | 7 +--- transports/quic/Cargo.toml | 11 ++----- transports/tcp/Cargo.toml | 4 +-- transports/tls/Cargo.toml | 11 ++----- transports/uds/Cargo.toml | 4 +-- transports/webrtc-websys/Cargo.toml | 19 +---------- 26 files changed, 37 insertions(+), 292 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 8c1349f4bc0..00000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[alias] -# Temporary solution to have clippy config in a single place until https://github.com/rust-lang/rust-clippy/blob/master/doc/roadmap-2021.md#lintstoml-configuration is shipped. -custom-clippy = "clippy --workspace --all-features --all-targets -- -A clippy::type_complexity -A clippy::pedantic -W clippy::used_underscore_binding -W unreachable_pub" diff --git a/Cargo.toml b/Cargo.toml index 9785f3c8910..ea3c6578eef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,7 +129,6 @@ multihash = "0.19.1" # This is expected to stay here until we move `libp2p-identity` to a separate repository which makes the dependency relationship more obvious. libp2p-identity = { path = "identity" } -# lint [workspace.lints] rust.unreachable_pub = "warn" clippy.used_underscore_binding = "warn" diff --git a/examples/browser-webrtc/Cargo.toml b/examples/browser-webrtc/Cargo.toml index e2a149deb82..f6b47d4ded9 100644 --- a/examples/browser-webrtc/Cargo.toml +++ b/examples/browser-webrtc/Cargo.toml @@ -21,18 +21,9 @@ rand = "0.8" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] axum = "0.6.19" -libp2p = { path = "../../libp2p", features = [ - "ed25519", - "macros", - "ping", - "wasm-bindgen", - "tokio", -] } +libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "wasm-bindgen", "tokio"] } libp2p-webrtc = { workspace = true, features = ["tokio"] } -rust-embed = { version = "8.0.0", features = [ - "include-exclude", - "interpolate-folder-path", -] } +rust-embed = { version = "8.0.0", features = ["include-exclude", "interpolate-folder-path"] } tokio = { version = "1.29", features = ["macros", "net", "rt", "signal"] } tokio-util = { version = "0.7", features = ["compat"] } tower = "0.4" @@ -41,24 +32,12 @@ mime_guess = "2.0.4" [target.'cfg(target_arch = "wasm32")'.dependencies] js-sys = "0.3.64" -libp2p = { path = "../../libp2p", features = [ - "ed25519", - "macros", - "ping", - "wasm-bindgen", -] } +libp2p = { path = "../../libp2p", features = [ "ed25519", "macros", "ping", "wasm-bindgen"] } libp2p-webrtc-websys = { workspace = true } wasm-bindgen = "0.2.84" wasm-bindgen-futures = "0.4.37" wasm-logger = { version = "0.2.0" } -web-sys = { version = "0.3", features = [ - 'Document', - 'Element', - 'HtmlElement', - 'Node', - 'Response', - 'Window', -] } +web-sys = { version = "0.3", features = ['Document', 'Element', 'HtmlElement', 'Node', 'Response', 'Window'] } [lints] workspace = true diff --git a/examples/chat/Cargo.toml b/examples/chat/Cargo.toml index c48a7047bd1..cee9e553e27 100644 --- a/examples/chat/Cargo.toml +++ b/examples/chat/Cargo.toml @@ -10,16 +10,7 @@ tokio = { version = "1.32", features = ["full"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "tokio", - "gossipsub", - "mdns", - "noise", - "macros", - "tcp", - "yamux", - "quic", -] } +libp2p = { path = "../../libp2p", features = [ "tokio", "gossipsub", "mdns", "noise", "macros", "tcp", "yamux", "quic"] } [lints] workspace = true diff --git a/examples/dcutr/Cargo.toml b/examples/dcutr/Cargo.toml index b44ab7ffe7a..49e1ada2e96 100644 --- a/examples/dcutr/Cargo.toml +++ b/examples/dcutr/Cargo.toml @@ -10,21 +10,7 @@ clap = { version = "4.3.23", features = ["derive"] } env_logger = "0.10.0" futures = "0.3.28" futures-timer = "3.0" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "dcutr", - "identify", - "macros", - "noise", - "ping", - "quic", - "relay", - "rendezvous", - "tcp", - "tokio", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "quic", "relay", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" [lints] diff --git a/examples/distributed-key-value-store/Cargo.toml b/examples/distributed-key-value-store/Cargo.toml index 3c289b13f0b..aa9a875be5a 100644 --- a/examples/distributed-key-value-store/Cargo.toml +++ b/examples/distributed-key-value-store/Cargo.toml @@ -10,17 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "kad", - "mdns", - "noise", - "macros", - "tcp", - "websocket", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "dns", "kad", "mdns", "noise", "macros", "tcp", "websocket", "yamux"] } [lints] workspace = true diff --git a/examples/file-sharing/Cargo.toml b/examples/file-sharing/Cargo.toml index 4b6325c5fe1..90462790c11 100644 --- a/examples/file-sharing/Cargo.toml +++ b/examples/file-sharing/Cargo.toml @@ -12,18 +12,7 @@ clap = { version = "4.3.23", features = ["derive"] } either = "1.9" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "cbor", - "dns", - "kad", - "noise", - "macros", - "request-response", - "tcp", - "websocket", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "cbor", "dns", "kad", "noise", "macros", "request-response", "tcp", "websocket", "yamux"] } void = "1.0.2" [lints] diff --git a/examples/identify/Cargo.toml b/examples/identify/Cargo.toml index 2aa88fb0a0f..cc30a0c614c 100644 --- a/examples/identify/Cargo.toml +++ b/examples/identify/Cargo.toml @@ -10,20 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "dcutr", - "identify", - "macros", - "noise", - "ping", - "relay", - "rendezvous", - "tcp", - "tokio", - "yamux", -] } +libp2p = { path = "../../libp2p", features = ["async-std", "dns", "dcutr", "identify", "macros", "noise", "ping", "relay", "rendezvous", "tcp", "tokio","yamux"] } [lints] workspace = true diff --git a/examples/ipfs-kad/Cargo.toml b/examples/ipfs-kad/Cargo.toml index 29f0ea54051..11750722e2d 100644 --- a/examples/ipfs-kad/Cargo.toml +++ b/examples/ipfs-kad/Cargo.toml @@ -10,16 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "kad", - "noise", - "tcp", - "websocket", - "yamux", - "rsa", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] } [lints] workspace = true diff --git a/examples/ipfs-private/Cargo.toml b/examples/ipfs-private/Cargo.toml index f616fa1164d..e576636e307 100644 --- a/examples/ipfs-private/Cargo.toml +++ b/examples/ipfs-private/Cargo.toml @@ -11,20 +11,7 @@ async-trait = "0.1" either = "1.9" env_logger = "0.10" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "gossipsub", - "dns", - "identify", - "kad", - "macros", - "noise", - "ping", - "pnet", - "tcp", - "websocket", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } [lints] workspace = true diff --git a/examples/metrics/Cargo.toml b/examples/metrics/Cargo.toml index 10c49556e83..8cf7e1fc406 100644 --- a/examples/metrics/Cargo.toml +++ b/examples/metrics/Cargo.toml @@ -9,16 +9,7 @@ license = "MIT" env_logger = "0.10.0" futures = "0.3.27" hyper = { version = "0.14", features = ["server", "tcp", "http1"] } -libp2p = { path = "../../libp2p", features = [ - "async-std", - "metrics", - "ping", - "noise", - "identify", - "tcp", - "yamux", - "macros", -] } +libp2p = { path = "../../libp2p", features = ["async-std", "metrics", "ping", "noise", "identify", "tcp", "yamux", "macros"] } log = "0.4.20" tokio = { version = "1", features = ["rt-multi-thread"] } prometheus-client = "0.21.2" diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 0ec6905719c..6f872354464 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -10,16 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "dns", - "macros", - "noise", - "ping", - "tcp", - "websocket", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } [lints] workspace = true diff --git a/examples/relay-server/Cargo.toml b/examples/relay-server/Cargo.toml index 517b5d4a457..39d899f5573 100644 --- a/examples/relay-server/Cargo.toml +++ b/examples/relay-server/Cargo.toml @@ -11,17 +11,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "noise", - "macros", - "ping", - "tcp", - "identify", - "yamux", - "relay", - "quic", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "noise", "macros", "ping", "tcp", "identify", "yamux", "relay", "quic"] } [lints] workspace = true diff --git a/examples/rendezvous/Cargo.toml b/examples/rendezvous/Cargo.toml index 479844e93a3..e98f465bc3b 100644 --- a/examples/rendezvous/Cargo.toml +++ b/examples/rendezvous/Cargo.toml @@ -10,17 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] } async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "async-std", - "identify", - "macros", - "noise", - "ping", - "rendezvous", - "tcp", - "tokio", - "yamux", -] } +libp2p = { path = "../../libp2p", features = [ "async-std", "identify", "macros", "noise", "ping", "rendezvous", "tcp", "tokio", "yamux"] } log = "0.4" tokio = { version = "1.32", features = ["rt-multi-thread", "macros", "time"] } diff --git a/examples/upnp/Cargo.toml b/examples/upnp/Cargo.toml index 7b68e8b0a84..74e88bf82bd 100644 --- a/examples/upnp/Cargo.toml +++ b/examples/upnp/Cargo.toml @@ -8,17 +8,7 @@ license = "MIT" [dependencies] tokio = { version = "1", features = ["rt-multi-thread", "macros"] } futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ - "tokio", - "dns", - "macros", - "noise", - "ping", - "tcp", - "websocket", - "yamux", - "upnp", -] } +libp2p = { path = "../../libp2p", features = ["tokio", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux", "upnp"] } [lints] workspace = true diff --git a/identity/Cargo.toml b/identity/Cargo.toml index 201d3b5c772..46c73bb7b60 100644 --- a/identity/Cargo.toml +++ b/identity/Cargo.toml @@ -19,11 +19,7 @@ hkdf = { version = "0.12.3", optional = true } libsecp256k1 = { version = "0.7.0", optional = true } log = "0.4" multihash = { version = "0.19.1", optional = true } -p256 = { version = "0.13", default-features = false, features = [ - "ecdsa", - "std", - "pem", -], optional = true } +p256 = { version = "0.13", default-features = false, features = [ "ecdsa", "std", "pem"], optional = true } quick-protobuf = "0.8.1" rand = { version = "0.8", optional = true } sec1 = { version = "0.7", default-features = false, optional = true } @@ -34,10 +30,7 @@ void = { version = "1.0", optional = true } zeroize = { version = "1.6", optional = true } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -ring = { version = "0.16.9", features = [ - "alloc", - "std", -], default-features = false, optional = true } +ring = { version = "0.16.9", features = [ "alloc", "std"], default-features = false, optional = true } [features] secp256k1 = ["dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:hkdf", "dep:zeroize"] diff --git a/interop-tests/Cargo.toml b/interop-tests/Cargo.toml index 046c5385616..ac046da69cd 100644 --- a/interop-tests/Cargo.toml +++ b/interop-tests/Cargo.toml @@ -19,20 +19,7 @@ rand = "0.8.5" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] axum = "0.6" -libp2p = { path = "../libp2p", features = [ - "ping", - "noise", - "tls", - "rsa", - "macros", - "websocket", - "tokio", - "yamux", - "tcp", - "dns", - "identify", - "quic", -] } +libp2p = { path = "../libp2p", features = [ "ping", "noise", "tls", "rsa", "macros", "websocket", "tokio", "yamux", "tcp", "dns", "identify", "quic"] } libp2p-webrtc = { workspace = true, features = ["tokio"] } libp2p-mplex = { path = "../muxers/mplex" } mime_guess = "2.0" @@ -48,13 +35,7 @@ tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } [target.'cfg(target_arch = "wasm32")'.dependencies] -libp2p = { path = "../libp2p", features = [ - "ping", - "macros", - "webtransport-websys", - "wasm-bindgen", - "identify", -] } +libp2p = { path = "../libp2p", features = [ "ping", "macros", "webtransport-websys", "wasm-bindgen", "identify"] } libp2p-webrtc-websys = { workspace = true } wasm-bindgen = { version = "0.2" } wasm-bindgen-futures = { version = "0.4" } diff --git a/libp2p/Cargo.toml b/libp2p/Cargo.toml index 0b4b937f565..1264a050561 100644 --- a/libp2p/Cargo.toml +++ b/libp2p/Cargo.toml @@ -53,13 +53,7 @@ full = [ "upnp", ] -async-std = [ - "libp2p-swarm/async-std", - "libp2p-mdns?/async-io", - "libp2p-tcp?/async-io", - "libp2p-dns?/async-std", - "libp2p-quic?/async-std", -] +async-std = [ "libp2p-swarm/async-std", "libp2p-mdns?/async-io", "libp2p-tcp?/async-io", "libp2p-dns?/async-std", "libp2p-quic?/async-std",] autonat = ["dep:libp2p-autonat"] cbor = ["libp2p-request-response?/cbor"] dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] @@ -89,22 +83,9 @@ secp256k1 = ["libp2p-identity/secp256k1"] serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] tcp = ["dep:libp2p-tcp"] tls = ["dep:libp2p-tls"] -tokio = [ - "libp2p-swarm/tokio", - "libp2p-mdns?/tokio", - "libp2p-tcp?/tokio", - "libp2p-dns?/tokio", - "libp2p-quic?/tokio", - "libp2p-upnp?/tokio", -] +tokio = [ "libp2p-swarm/tokio", "libp2p-mdns?/tokio", "libp2p-tcp?/tokio", "libp2p-dns?/tokio", "libp2p-quic?/tokio", "libp2p-upnp?/tokio"] uds = ["dep:libp2p-uds"] -wasm-bindgen = [ - "futures-timer/wasm-bindgen", - "instant/wasm-bindgen", - "getrandom/js", - "libp2p-swarm/wasm-bindgen", - "libp2p-gossipsub?/wasm-bindgen", -] +wasm-bindgen = [ "futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen", "libp2p-gossipsub?/wasm-bindgen",] wasm-ext = ["dep:libp2p-wasm-ext"] wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] websocket = ["dep:libp2p-websocket"] @@ -163,13 +144,7 @@ async-trait = "0.1" either = "1.8.0" env_logger = "0.10.0" clap = { version = "4.1.6", features = ["derive"] } -tokio = { version = "1.15", features = [ - "io-util", - "io-std", - "macros", - "rt", - "rt-multi-thread", -] } +tokio = { version = "1.15", features = [ "io-util", "io-std", "macros", "rt", "rt-multi-thread"] } libp2p-noise = { workspace = true } libp2p-tcp = { workspace = true, features = ["tokio"] } diff --git a/transports/dns/Cargo.toml b/transports/dns/Cargo.toml index 19fefc890e0..1d5fb1bc7f9 100644 --- a/transports/dns/Cargo.toml +++ b/transports/dns/Cargo.toml @@ -18,17 +18,12 @@ log = "0.4.20" futures = "0.3.28" async-std-resolver = { version = "0.23", optional = true } parking_lot = "0.12.0" -trust-dns-resolver = { version = "0.23", default-features = false, features = [ - "system-config", -] } +trust-dns-resolver = { version = "0.23", default-features = false, features = ["system-config"] } smallvec = "1.11.1" [dev-dependencies] env_logger = "0.10" -tokio-crate = { package = "tokio", version = "1.0", default-features = false, features = [ - "rt", - "time", -] } +tokio-crate = { package = "tokio", version = "1.0", default-features = false, features = ["rt", "time"] } async-std-crate = { package = "async-std", version = "1.6" } [features] @@ -38,10 +33,7 @@ tokio = ["trust-dns-resolver/tokio-runtime"] # since these features of `trust-dns-resolver` are currently only # available for `tokio`. tokio-dns-over-rustls = ["tokio", "trust-dns-resolver/dns-over-rustls"] -tokio-dns-over-https-rustls = [ - "tokio", - "trust-dns-resolver/dns-over-https-rustls", -] +tokio-dns-over-https-rustls = ["tokio", "trust-dns-resolver/dns-over-https-rustls"] # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling diff --git a/transports/noise/Cargo.toml b/transports/noise/Cargo.toml index b448a118d4c..a5bf6659b6b 100644 --- a/transports/noise/Cargo.toml +++ b/transports/noise/Cargo.toml @@ -27,14 +27,10 @@ x25519-dalek = "1.1.0" zeroize = "1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -snow = { version = "0.9.2", features = [ - "ring-resolver", -], default-features = false } +snow = { version = "0.9.2", features = ["ring-resolver"], default-features = false } [target.'cfg(target_arch = "wasm32")'.dependencies] -snow = { version = "0.9.2", features = [ - "default-resolver", -], default-features = false } +snow = { version = "0.9.2", features = ["default-resolver"], default-features = false } [dev-dependencies] env_logger = "0.10.0" diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index 68a87993607..c4e2d7dc385 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -20,12 +20,7 @@ pin-project = "1.1.3" [dev-dependencies] libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = [ - "ed25519", - "rsa", - "ecdsa", - "secp256k1", -] } +libp2p-identity = { workspace = true, features = [ "ed25519", "rsa", "ecdsa","secp256k1"] } libp2p-noise = { workspace = true } libp2p-swarm = { workspace = true, features = ["tokio"] } libp2p-tcp = { workspace = true, features = ["tokio"] } diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 8a80c2e6310..7bacb8e6f59 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -19,18 +19,11 @@ libp2p-tls = { workspace = true } libp2p-identity = { workspace = true } log = "0.4" parking_lot = "0.12.0" -quinn = { version = "0.10.2", default-features = false, features = [ - "tls-rustls", - "futures-io", -] } +quinn = { version = "0.10.2", default-features = false, features = [ "tls-rustls", "futures-io"] } rand = "0.8.5" rustls = { version = "0.21.7", default-features = false } thiserror = "1.0.48" -tokio = { version = "1.32.0", default-features = false, features = [ - "net", - "rt", - "time", -], optional = true } +tokio = { version = "1.32.0", default-features = false, features = [ "net", "rt", "time"], optional = true } socket2 = "0.5.4" ring = "0.16.20" diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index f279660c1ee..2c5f9424cf3 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -20,9 +20,7 @@ libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4.20" socket2 = { version = "0.5.4", features = ["all"] } -tokio = { version = "1.32.0", default-features = false, features = [ - "net", -], optional = true } +tokio = { version = "1.32.0", default-features = false, features = ["net",], optional = true } [features] tokio = ["dep:tokio", "if-watch/tokio"] diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index c5cc801320a..9201e0a7a61 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -24,20 +24,13 @@ yasna = "0.5.2" [dependencies.rustls] version = "0.21.7" default-features = false -features = [ - "dangerous_configuration", -] # Must enable this to allow for custom verification code. +features = ["dangerous_configuration"] # Must enable this to allow for custom verification code. [dev-dependencies] hex = "0.4.3" hex-literal = "0.4.1" libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = [ - "ed25519", - "rsa", - "secp256k1", - "ecdsa", -] } +libp2p-identity = { workspace = true, features = [ "ed25519", "rsa", "secp256k1", "ecdsa"] } libp2p-swarm = { workspace = true } libp2p-yamux = { workspace = true } tokio = { version = "1.32.0", features = ["full"] } diff --git a/transports/uds/Cargo.toml b/transports/uds/Cargo.toml index 994dd0f8faf..1bc78ff35a9 100644 --- a/transports/uds/Cargo.toml +++ b/transports/uds/Cargo.toml @@ -15,9 +15,7 @@ async-std = { version = "1.6.2", optional = true } libp2p-core = { workspace = true } log = "0.4.20" futures = "0.3.28" -tokio = { version = "1.32", default-features = false, features = [ - "net", -], optional = true } +tokio = { version = "1.32", default-features = false, features = ["net"], optional = true } [dev-dependencies] tempfile = "3.8" diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index fd84136a0ae..5d7671be663 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -28,24 +28,7 @@ serde = { version = "1.0", features = ["derive"] } thiserror = "1" wasm-bindgen = { version = "0.2.87" } wasm-bindgen-futures = { version = "0.4.37" } -web-sys = { version = "0.3.64", features = [ - "Document", - "Location", - "MessageEvent", - "Navigator", - "RtcCertificate", - "RtcConfiguration", - "RtcDataChannel", - "RtcDataChannelEvent", - "RtcDataChannelInit", - "RtcDataChannelState", - "RtcDataChannelType", - "RtcPeerConnection", - "RtcSdpType", - "RtcSessionDescription", - "RtcSessionDescriptionInit", - "Window", -] } +web-sys = { version = "0.3.64", features = [ "Document", "Location", "MessageEvent", "Navigator", "RtcCertificate", "RtcConfiguration", "RtcDataChannel", "RtcDataChannelEvent", "RtcDataChannelInit", "RtcDataChannelState", "RtcDataChannelType", "RtcPeerConnection", "RtcSdpType", "RtcSessionDescription", "RtcSessionDescriptionInit", "Window"] } [dev-dependencies] hex-literal = "0.4" From c2dca5fb0039546f987eb9ea50f73ecb73eb801e Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:45:33 +1100 Subject: [PATCH 08/14] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdadd7ad939..5742e4f5435 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -219,7 +219,7 @@ jobs: save-if: ${{ github.ref == 'refs/heads/master' }} - name: Run cargo clippy - run: cargo clippy # cargo alias to allow reuse of config locally + run: cargo clippy ipfs-integration-test: name: IPFS Integration tests From 324b7480812059542719dcff1f3b2b09b6d3c686 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:47:00 +1100 Subject: [PATCH 09/14] Update protocols/autonat/Cargo.toml --- protocols/autonat/Cargo.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/protocols/autonat/Cargo.toml b/protocols/autonat/Cargo.toml index a9bdb621b41..3b81d62b516 100644 --- a/protocols/autonat/Cargo.toml +++ b/protocols/autonat/Cargo.toml @@ -4,10 +4,7 @@ edition = "2021" rust-version = { workspace = true } description = "NAT and firewall detection for libp2p" version = "0.11.0" -authors = [ - "David Craven ", - "Elena Frank ", -] +authors = ["David Craven ", "Elena Frank "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] From e434db4bb324d8de89886f7f0b32faa25f91c862 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:47:51 +1100 Subject: [PATCH 10/14] Update swarm-derive/Cargo.toml --- swarm-derive/Cargo.toml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/swarm-derive/Cargo.toml b/swarm-derive/Cargo.toml index 2612ef10a80..cab9488b597 100644 --- a/swarm-derive/Cargo.toml +++ b/swarm-derive/Cargo.toml @@ -16,13 +16,7 @@ proc-macro = true [dependencies] heck = "0.4" quote = "1.0" -syn = { version = "2.0.37", default-features = false, features = [ - "clone-impls", - "derive", - "parsing", - "printing", - "proc-macro", -] } +syn = { version = "2.0.37", default-features = false, features = ["clone-impls", "derive", "parsing", "printing", "proc-macro"] } proc-macro-warning = "0.4.2" proc-macro2 = "1.0" From 00acac032cfe77163b03ed0a76e020e2f669a7f5 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:48:31 +1100 Subject: [PATCH 11/14] Update swarm/Cargo.toml --- swarm/Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/swarm/Cargo.toml b/swarm/Cargo.toml index 79332841d87..038041c536f 100644 --- a/swarm/Cargo.toml +++ b/swarm/Cargo.toml @@ -24,9 +24,7 @@ rand = "0.8" smallvec = "1.11.1" void = "1" wasm-bindgen-futures = { version = "0.4.37", optional = true } -getrandom = { version = "0.2.9", features = [ - "js", -], optional = true } # Explicit dependency to be used in `wasm-bindgen` feature +getrandom = { version = "0.2.9", features = ["js"], optional = true } # Explicit dependency to be used in `wasm-bindgen` feature once_cell = "1.18.0" multistream-select = { workspace = true } From e733471d5f11d8c2c8c7ca0165bd797a031b77e4 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:50:15 +1100 Subject: [PATCH 12/14] Apply suggestions from code review --- transports/pnet/Cargo.toml | 2 +- transports/quic/Cargo.toml | 4 ++-- transports/tcp/Cargo.toml | 2 +- transports/tls/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/transports/pnet/Cargo.toml b/transports/pnet/Cargo.toml index c4e2d7dc385..1a3a1224fbb 100644 --- a/transports/pnet/Cargo.toml +++ b/transports/pnet/Cargo.toml @@ -20,7 +20,7 @@ pin-project = "1.1.3" [dev-dependencies] libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = [ "ed25519", "rsa", "ecdsa","secp256k1"] } +libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "ecdsa","secp256k1"] } libp2p-noise = { workspace = true } libp2p-swarm = { workspace = true, features = ["tokio"] } libp2p-tcp = { workspace = true, features = ["tokio"] } diff --git a/transports/quic/Cargo.toml b/transports/quic/Cargo.toml index 7bacb8e6f59..7a45cce9403 100644 --- a/transports/quic/Cargo.toml +++ b/transports/quic/Cargo.toml @@ -19,11 +19,11 @@ libp2p-tls = { workspace = true } libp2p-identity = { workspace = true } log = "0.4" parking_lot = "0.12.0" -quinn = { version = "0.10.2", default-features = false, features = [ "tls-rustls", "futures-io"] } +quinn = { version = "0.10.2", default-features = false, features = ["tls-rustls", "futures-io"] } rand = "0.8.5" rustls = { version = "0.21.7", default-features = false } thiserror = "1.0.48" -tokio = { version = "1.32.0", default-features = false, features = [ "net", "rt", "time"], optional = true } +tokio = { version = "1.32.0", default-features = false, features = ["net", "rt", "time"], optional = true } socket2 = "0.5.4" ring = "0.16.20" diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 2c5f9424cf3..1cb060eed54 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -20,7 +20,7 @@ libp2p-core = { workspace = true } libp2p-identity = { workspace = true } log = "0.4.20" socket2 = { version = "0.5.4", features = ["all"] } -tokio = { version = "1.32.0", default-features = false, features = ["net",], optional = true } +tokio = { version = "1.32.0", default-features = false, features = ["net"], optional = true } [features] tokio = ["dep:tokio", "if-watch/tokio"] diff --git a/transports/tls/Cargo.toml b/transports/tls/Cargo.toml index 9201e0a7a61..510d34f5627 100644 --- a/transports/tls/Cargo.toml +++ b/transports/tls/Cargo.toml @@ -30,7 +30,7 @@ features = ["dangerous_configuration"] # Must enable this to allow for custom ve hex = "0.4.3" hex-literal = "0.4.1" libp2p-core = { workspace = true } -libp2p-identity = { workspace = true, features = [ "ed25519", "rsa", "secp256k1", "ecdsa"] } +libp2p-identity = { workspace = true, features = ["ed25519", "rsa", "secp256k1", "ecdsa"] } libp2p-swarm = { workspace = true } libp2p-yamux = { workspace = true } tokio = { version = "1.32.0", features = ["full"] } From 64f8c0eff24fb8ac477a480db0184e2d24692927 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 3 Oct 2023 12:50:33 +1100 Subject: [PATCH 13/14] Update transports/webrtc-websys/Cargo.toml --- transports/webrtc-websys/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/webrtc-websys/Cargo.toml b/transports/webrtc-websys/Cargo.toml index 5d7671be663..cb90573b1fe 100644 --- a/transports/webrtc-websys/Cargo.toml +++ b/transports/webrtc-websys/Cargo.toml @@ -28,7 +28,7 @@ serde = { version = "1.0", features = ["derive"] } thiserror = "1" wasm-bindgen = { version = "0.2.87" } wasm-bindgen-futures = { version = "0.4.37" } -web-sys = { version = "0.3.64", features = [ "Document", "Location", "MessageEvent", "Navigator", "RtcCertificate", "RtcConfiguration", "RtcDataChannel", "RtcDataChannelEvent", "RtcDataChannelInit", "RtcDataChannelState", "RtcDataChannelType", "RtcPeerConnection", "RtcSdpType", "RtcSessionDescription", "RtcSessionDescriptionInit", "Window"] } +web-sys = { version = "0.3.64", features = ["Document", "Location", "MessageEvent", "Navigator", "RtcCertificate", "RtcConfiguration", "RtcDataChannel", "RtcDataChannelEvent", "RtcDataChannelInit", "RtcDataChannelState", "RtcDataChannelType", "RtcPeerConnection", "RtcSdpType", "RtcSessionDescription", "RtcSessionDescriptionInit", "Window"] } [dev-dependencies] hex-literal = "0.4" From 00718e399129ced046a88cc5dfb18927b0311f32 Mon Sep 17 00:00:00 2001 From: binsta Date: Wed, 4 Oct 2023 01:09:18 +0530 Subject: [PATCH 14/14] fix: resolve merge conflicts --- examples/ping/Cargo.toml | 5 ++--- examples/ping/src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/ping/Cargo.toml b/examples/ping/Cargo.toml index 6f872354464..b39df505b4a 100644 --- a/examples/ping/Cargo.toml +++ b/examples/ping/Cargo.toml @@ -6,11 +6,10 @@ publish = false license = "MIT" [dependencies] -async-std = { version = "1.12", features = ["attributes"] } -async-trait = "0.1" env_logger = "0.10.0" futures = "0.3.28" -libp2p = { path = "../../libp2p", features = [ "async-std", "dns", "macros", "noise", "ping", "tcp", "websocket", "yamux"] } +libp2p = { path = "../../libp2p", features = ["noise", "ping", "tcp", "tokio", "yamux"] } +tokio = { version = "1.32.0", features = ["full"] } [lints] workspace = true diff --git a/examples/ping/src/main.rs b/examples/ping/src/main.rs index 898a25813e0..25939a132c1 100644 --- a/examples/ping/src/main.rs +++ b/examples/ping/src/main.rs @@ -30,20 +30,20 @@ use libp2p::{ use std::error::Error; use std::time::Duration; -#[async_std::main] +#[tokio::main] async fn main() -> Result<(), Box> { env_logger::init(); let local_key = identity::Keypair::generate_ed25519(); let local_peer_id = PeerId::from(local_key.public()); - let transport = tcp::async_io::Transport::default() + let transport = tcp::tokio::Transport::default() .upgrade(Version::V1Lazy) .authenticate(noise::Config::new(&local_key)?) .multiplex(yamux::Config::default()) .boxed(); let mut swarm = - SwarmBuilder::with_async_std_executor(transport, ping::Behaviour::default(), local_peer_id) + SwarmBuilder::with_tokio_executor(transport, ping::Behaviour::default(), local_peer_id) .idle_connection_timeout(Duration::from_secs(60)) // For illustrative purposes, keep idle connections alive for a minute so we can observe a few pings. .build();