ci: use workspace inheritance to enforce lints in all crates

Starting with nightly-2023-09-10, the `[lints]` section in `Cargo.toml` files is stable. Together with workspace inheritance, this can be used to declare all lints we want to enforce in a single place.

Resolves: #4484.

Pull-Request: #4575.
This commit is contained in:
Binston Sukhael Cardoza
2023-10-09 07:50:46 +05:30
committed by GitHub
parent 35b8308817
commit 0e9d339bd2
67 changed files with 246 additions and 48 deletions

View File

@ -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"

View File

@ -200,8 +200,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
rust-version: [ rust-version: [
1.72.0, # current stable # 1.72.0, # current stable
beta # beta,
nightly-2023-09-10
] ]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -218,7 +219,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/master' }} save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Run cargo clippy - name: Run cargo clippy
run: cargo custom-clippy # cargo alias to allow reuse of config locally run: cargo clippy
ipfs-integration-test: ipfs-integration-test:
name: IPFS Integration tests name: IPFS Integration tests

View File

@ -128,3 +128,9 @@ multihash = "0.19.1"
# we import via `rust-multiaddr`. # 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. # 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" } libp2p-identity = { path = "identity" }
[workspace.lints]
rust.unreachable_pub = "warn"
clippy.used_underscore_binding = "warn"
clippy.pedantic = "allow"
clippy.type_complexity = "allow"

View File

@ -37,7 +37,7 @@ void = "1"
async-std = { version = "1.6.2", features = ["attributes"] } 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-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. libp2p-noise = { path = "../transports/noise" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
multihash = { workspace = true , features = ["arb"] } multihash = { workspace = true, features = ["arb"] }
quickcheck = { workspace = true } quickcheck = { workspace = true }
libp2p-identity = { workspace = true, features = ["ed25519"] } libp2p-identity = { workspace = true, features = ["ed25519"] }
@ -50,3 +50,6 @@ serde = ["multihash/serde-codec", "dep:serde", "libp2p-identity/serde"]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -11,3 +11,6 @@ clap = { version = "4.3.23", features = ["derive"] }
env_logger = "0.10.0" env_logger = "0.10.0"
futures = "0.3.28" futures = "0.3.28"
libp2p = { path = "../../libp2p", features = ["tokio", "tcp", "noise", "yamux", "autonat", "identify", "macros"] } libp2p = { path = "../../libp2p", features = ["tokio", "tcp", "noise", "yamux", "autonat", "identify", "macros"] }
[lints]
workspace = true

View File

@ -21,7 +21,7 @@ rand = "0.8"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
axum = "0.6.19" 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"] } 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 = { version = "1.29", features = ["macros", "net", "rt", "signal"] }
@ -32,9 +32,12 @@ mime_guess = "2.0.4"
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.64" 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 } libp2p-webrtc-websys = { workspace = true }
wasm-bindgen = "0.2.84" wasm-bindgen = "0.2.84"
wasm-bindgen-futures = "0.4.37" wasm-bindgen-futures = "0.4.37"
wasm-logger = { version = "0.2.0" } 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

View File

@ -10,4 +10,7 @@ tokio = { version = "1.32", features = ["full"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10.0" env_logger = "0.10.0"
futures = "0.3.28" 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

View File

@ -10,5 +10,8 @@ clap = { version = "4.3.23", features = ["derive"] }
env_logger = "0.10.0" env_logger = "0.10.0"
futures = "0.3.28" futures = "0.3.28"
futures-timer = "3.0" 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" log = "0.4"
[lints]
workspace = true

View File

@ -10,4 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10" env_logger = "0.10"
futures = "0.3.28" 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

View File

@ -12,5 +12,8 @@ clap = { version = "4.3.23", features = ["derive"] }
either = "1.9" either = "1.9"
env_logger = "0.10" env_logger = "0.10"
futures = "0.3.28" 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" void = "1.0.2"
[lints]
workspace = true

View File

@ -10,4 +10,7 @@ async-std = { version = "1.12", features = ["attributes"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10" env_logger = "0.10"
futures = "0.3.28" 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

View File

@ -10,4 +10,7 @@ tokio = { version = "1.12", features = ["rt-multi-thread", "macros"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10" env_logger = "0.10"
futures = "0.3.28" futures = "0.3.28"
libp2p = { path = "../../libp2p", features = ["tokio", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] } libp2p = { path = "../../libp2p", features = [ "tokio", "dns", "kad", "noise", "tcp", "websocket", "yamux", "rsa"] }
[lints]
workspace = true

View File

@ -11,4 +11,7 @@ async-trait = "0.1"
either = "1.9" either = "1.9"
env_logger = "0.10" env_logger = "0.10"
futures = "0.3.28" futures = "0.3.28"
libp2p = { path = "../../libp2p", features = ["tokio", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] } libp2p = { path = "../../libp2p", features = [ "tokio", "gossipsub", "dns", "identify", "kad", "macros", "noise", "ping", "pnet", "tcp", "websocket", "yamux"] }
[lints]
workspace = true

View File

@ -13,3 +13,6 @@ libp2p = { path = "../../libp2p", features = ["async-std", "metrics", "ping", "n
log = "0.4.20" log = "0.4.20"
tokio = { version = "1", features = ["rt-multi-thread"] } tokio = { version = "1", features = ["rt-multi-thread"] }
prometheus-client = "0.21.2" prometheus-client = "0.21.2"
[lints]
workspace = true

View File

@ -10,3 +10,6 @@ env_logger = "0.10.0"
futures = "0.3.28" futures = "0.3.28"
libp2p = { path = "../../libp2p", features = ["noise", "ping", "tcp", "tokio", "yamux"] } libp2p = { path = "../../libp2p", features = ["noise", "ping", "tcp", "tokio", "yamux"] }
tokio = { version = "1.32.0", features = ["full"] } tokio = { version = "1.32.0", features = ["full"] }
[lints]
workspace = true

View File

@ -11,4 +11,7 @@ async-std = { version = "1.12", features = ["attributes"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10.0" env_logger = "0.10.0"
futures = "0.3.28" 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

View File

@ -10,6 +10,9 @@ async-std = { version = "1.12", features = ["attributes"] }
async-trait = "0.1" async-trait = "0.1"
env_logger = "0.10.0" env_logger = "0.10.0"
futures = "0.3.28" 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" 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

View File

@ -6,6 +6,9 @@ publish = false
license = "MIT" license = "MIT"
[dependencies] [dependencies]
tokio = { version = "1", features = [ "rt-multi-thread", "macros"] } tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
futures = "0.3.28" 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

View File

@ -19,7 +19,7 @@ hkdf = { version = "0.12.3", optional = true }
libsecp256k1 = { version = "0.7.0", optional = true } libsecp256k1 = { version = "0.7.0", optional = true }
log = "0.4" log = "0.4"
multihash = { version = "0.19.1", optional = true } 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" quick-protobuf = "0.8.1"
rand = { version = "0.8", optional = true } rand = { version = "0.8", optional = true }
sec1 = { version = "0.7", default-features = false, optional = true } sec1 = { version = "0.7", default-features = false, optional = true }
@ -30,14 +30,14 @@ void = { version = "1.0", optional = true }
zeroize = { version = "1.6", optional = true } zeroize = { version = "1.6", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [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] [features]
secp256k1 = [ "dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:hkdf", "dep:zeroize" ] secp256k1 = ["dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:hkdf", "dep:zeroize"]
ecdsa = [ "dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1", "dep:sha2", "dep:hkdf" ] ecdsa = ["dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1", "dep:sha2", "dep:hkdf"]
rsa = [ "dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize" ] rsa = ["dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize"]
ed25519 = [ "dep:ed25519-dalek", "dep:rand", "dep:zeroize", "dep:sha2", "dep:hkdf" ] ed25519 = ["dep:ed25519-dalek", "dep:rand", "dep:zeroize", "dep:sha2", "dep:hkdf"]
peerid = [ "dep:multihash", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2", "dep:hkdf" ] peerid = ["dep:multihash", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2", "dep:hkdf" ]
[dev-dependencies] [dev-dependencies]
quickcheck = { workspace = true } quickcheck = { workspace = true }
@ -57,3 +57,6 @@ harness = false
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -19,11 +19,13 @@ rand = "0.8.5"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
axum = "0.6" 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-webrtc = { workspace = true, features = ["tokio"] }
libp2p-mplex = { path = "../muxers/mplex" } libp2p-mplex = { path = "../muxers/mplex" }
mime_guess = "2.0" 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" rust-embed = "8.0"
serde_json = "1" serde_json = "1"
thirtyfour = "=0.32.0-rc.8" # https://github.com/stevepryde/thirtyfour/issues/169 thirtyfour = "=0.32.0-rc.8" # https://github.com/stevepryde/thirtyfour/issues/169
@ -33,7 +35,7 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[target.'cfg(target_arch = "wasm32")'.dependencies] [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 } libp2p-webrtc-websys = { workspace = true }
wasm-bindgen = { version = "0.2" } wasm-bindgen = { version = "0.2" }
wasm-bindgen-futures = { version = "0.4" } wasm-bindgen-futures = { version = "0.4" }
@ -42,3 +44,6 @@ instant = "0.1.12"
reqwest = { version = "0.11", features = ["json"] } reqwest = { version = "0.11", features = ["json"] }
console_error_panic_hook = { version = "0.1.7" } console_error_panic_hook = { version = "0.1.7" }
futures-timer = "3.0.2" futures-timer = "3.0.2"
[lints]
workspace = true

View File

@ -50,10 +50,10 @@ full = [
"websocket", "websocket",
"webtransport-websys", "webtransport-websys",
"yamux", "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"] autonat = ["dep:libp2p-autonat"]
cbor = ["libp2p-request-response?/cbor"] cbor = ["libp2p-request-response?/cbor"]
dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"] dcutr = ["dep:libp2p-dcutr", "libp2p-metrics?/dcutr"]
@ -83,9 +83,9 @@ secp256k1 = ["libp2p-identity/secp256k1"]
serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"] serde = ["libp2p-core/serde", "libp2p-kad?/serde", "libp2p-gossipsub?/serde"]
tcp = ["dep:libp2p-tcp"] tcp = ["dep:libp2p-tcp"]
tls = ["dep:libp2p-tls"] 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"] 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 = ["dep:libp2p-wasm-ext"]
wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"] wasm-ext-websocket = ["wasm-ext", "libp2p-wasm-ext?/websocket"]
websocket = ["dep:libp2p-websocket"] websocket = ["dep:libp2p-websocket"]
@ -144,7 +144,7 @@ async-trait = "0.1"
either = "1.8.0" either = "1.8.0"
env_logger = "0.10.0" env_logger = "0.10.0"
clap = { version = "4.1.6", features = ["derive"] } 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-noise = { workspace = true }
libp2p-tcp = { workspace = true, features = ["tokio"] } libp2p-tcp = { workspace = true, features = ["tokio"] }
@ -155,3 +155,6 @@ libp2p-tcp = { workspace = true, features = ["tokio"] }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -19,3 +19,6 @@ void = "1"
async-std = { version = "1.12.0", features = ["attributes"] } async-std = { version = "1.12.0", features = ["attributes"] }
libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-derive = { path = "../../swarm-derive" }
libp2p-swarm-test = { path = "../../swarm-test" } libp2p-swarm-test = { path = "../../swarm-test" }
[lints]
workspace = true

View File

@ -23,3 +23,6 @@ libp2p-swarm-derive = { path = "../../swarm-derive" }
libp2p-swarm-test = { path = "../../swarm-test" } libp2p-swarm-test = { path = "../../swarm-test" }
quickcheck = { workspace = true } quickcheck = { workspace = true }
rand = "0.8.5" rand = "0.8.5"
[lints]
workspace = true

View File

@ -18,3 +18,6 @@ futures-timer = "3.0.2"
[dev-dependencies] [dev-dependencies]
tokio = { version = "1.29.1", features = ["macros", "rt"] } tokio = { version = "1.29.1", features = ["macros", "rt"] }
[lints]
workspace = true

View File

@ -17,3 +17,6 @@ serde_json = "1.0.107"
libp2p-core = { workspace = true } libp2p-core = { workspace = true }
base64 = "0.21.4" base64 = "0.21.4"
libp2p-identity = { workspace = true } libp2p-identity = { workspace = true }
[lints]
workspace = true

View File

@ -24,3 +24,6 @@ libp2p-identify = { workspace = true }
libp2p-swarm-derive = { path = "../../swarm-derive" } libp2p-swarm-derive = { path = "../../swarm-derive" }
libp2p-swarm-test = { path = "../../swarm-test" } libp2p-swarm-test = { path = "../../swarm-test" }
rand = "0.8.5" rand = "0.8.5"
[lints]
workspace = true

View File

@ -38,3 +38,6 @@ prometheus-client = { version = "0.21.2"}
all-features = true all-features = true
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -32,3 +32,6 @@ rw-stream-sink = { workspace = true }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -23,3 +23,6 @@ quick-protobuf = "0.8"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -8,3 +8,6 @@ license = "Unlicense/MIT"
[dependencies] [dependencies]
quickcheck = "1" quickcheck = "1"
num-traits = "0.2" num-traits = "0.2"
[lints]
workspace = true

View File

@ -24,3 +24,6 @@ async-std = "1.0"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -25,3 +25,6 @@ serde_derive = "1.0.125"
serde_json = "1.0" serde_json = "1.0"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] } tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
zeroize = "1" zeroize = "1"
[lints]
workspace = true

View File

@ -30,3 +30,6 @@ asynchronous-codec = "0.6"
[dev-dependencies] [dev-dependencies]
hex-literal = "0.4" hex-literal = "0.4"
unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] } unsigned-varint = { version = "0.7", features = ["asynchronous_codec"] }
[lints]
workspace = true

View File

@ -43,3 +43,6 @@ harness = false
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -13,3 +13,6 @@ futures = "0.3.28"
log = "0.4" log = "0.4"
futures-timer = "3.0.2" futures-timer = "3.0.2"
futures_ringbuf = "0.4.0" futures_ringbuf = "0.4.0"
[lints]
workspace = true

View File

@ -27,3 +27,6 @@ libp2p-muxer-test-harness = { path = "../test-harness" }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -34,3 +34,6 @@ libp2p-swarm-test = { path = "../../swarm-test" }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -47,3 +47,6 @@ rand = "0.8"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -31,3 +31,6 @@ thiserror = "1.0.49"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -58,3 +58,6 @@ quickcheck = { workspace = true }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -39,3 +39,6 @@ libp2p-swarm = { workspace = true, features = ["macros"] }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -54,3 +54,6 @@ serde = ["dep:serde", "bytes/serde"]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -55,3 +55,6 @@ required-features = ["tokio"]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -43,3 +43,6 @@ libp2p-swarm-test = { path = "../../swarm-test" }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -35,3 +35,6 @@ quickcheck = { workspace = true }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -43,3 +43,6 @@ quickcheck = { workspace = true }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -46,3 +46,6 @@ libp2p-swarm-test = { path = "../../swarm-test" }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -46,3 +46,6 @@ serde = { version = "1.0", features = ["derive"]}
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -22,3 +22,6 @@ tokio = { version = "1.29", default-features = false, features = ["rt"], optiona
[features] [features]
tokio = ["igd-next/aio_tokio", "dep:tokio"] tokio = ["igd-next/aio_tokio", "dep:tokio"]
[lints]
workspace = true

View File

@ -26,3 +26,6 @@ proc-macro2 = "1.0"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -23,3 +23,6 @@ futures = "0.3.28"
log = "0.4.20" log = "0.4.20"
rand = "0.8.5" rand = "0.8.5"
futures-timer = "3.0.2" futures-timer = "3.0.2"
[lints]
workspace = true

View File

@ -67,3 +67,6 @@ required-features = ["macros"]
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -28,3 +28,6 @@ futures_ringbuf = "0.4.0"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -41,3 +41,6 @@ tokio-dns-over-https-rustls = ["tokio", "trust-dns-resolver/dns-over-https-rustl
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -43,3 +43,6 @@ quickcheck = { workspace = true }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -33,3 +33,6 @@ futures_ringbuf = "0.4.0"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -20,7 +20,7 @@ pin-project = "1.1.3"
[dev-dependencies] [dev-dependencies]
libp2p-core = { workspace = true } 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-noise = { workspace = true }
libp2p-swarm = { workspace = true, features = ["tokio"] } libp2p-swarm = { workspace = true, features = ["tokio"] }
libp2p-tcp = { workspace = true, features = ["tokio"] } libp2p-tcp = { workspace = true, features = ["tokio"] }
@ -35,3 +35,6 @@ tokio = { version = "1.32.0", features = ["full"] }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -51,3 +51,6 @@ tokio = { version = "1.32.0", features = ["macros", "rt-multi-thread", "time"] }
[[test]] [[test]]
name = "stream_compliance" name = "stream_compliance"
required-features = ["async-std"] required-features = ["async-std"]
[lints]
workspace = true

View File

@ -38,3 +38,6 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -41,3 +41,6 @@ tokio = { version = "1.32.0", features = ["full"] }
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -26,3 +26,6 @@ tempfile = "3.8"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -27,3 +27,6 @@ websocket = []
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -34,3 +34,6 @@ web-sys = { version = "0.3.64", features = ["Document", "Location", "MessageEven
hex-literal = "0.4" hex-literal = "0.4"
libp2p-ping = { workspace = true } libp2p-ping = { workspace = true }
libp2p-swarm = { workspace = true, features = ["wasm-bindgen"] } libp2p-swarm = { workspace = true, features = ["wasm-bindgen"] }
[lints]
workspace = true

View File

@ -29,7 +29,7 @@ serde = { version = "1.0", features = ["derive"] }
stun = "0.5" stun = "0.5"
thiserror = "1" thiserror = "1"
tinytemplate = "1.2" 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 } tokio-util = { version = "0.7", features = ["compat"], optional = true }
webrtc = { version = "0.9.0", optional = true } webrtc = { version = "0.9.0", optional = true }
@ -45,3 +45,6 @@ quickcheck = "1.0.3"
[[test]] [[test]]
name = "smoke" name = "smoke"
required-features = ["tokio"] required-features = ["tokio"]
[lints]
workspace = true

View File

@ -36,3 +36,6 @@ rcgen = "0.10.0"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -46,3 +46,6 @@ multibase = "0.9.1"
all-features = true all-features = true
rustdoc-args = ["--cfg", "docsrs"] rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true

View File

@ -18,3 +18,6 @@ wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "0.4.37" wasm-bindgen-futures = "0.4.37"
wasm-bindgen-test = "0.3.37" wasm-bindgen-test = "0.3.37"
web-sys = { version = "0.3.64", features = ["Response", "Window"] } web-sys = { version = "0.3.64", features = ["Response", "Window"] }
[lints]
workspace = true