[package]
name = "libp2p-swarm"
edition = "2021"
rust-version = { workspace = true }
description = "The libp2p swarm"
version = "0.44.2"
authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]
[dependencies]
either = "1.11.0"
fnv = "1.0"
futures = { workspace = true }
futures-timer = "3.0.3"
getrandom = { version = "0.2.14", features = ["js"], optional = true }
instant = "0.1.12"
libp2p-core = { workspace = true }
libp2p-identity = { workspace = true }
libp2p-swarm-derive = { workspace = true, optional = true }
lru = "0.12.3"
multistream-select = { workspace = true }
once_cell = "1.19.0"
rand = "0.8"
smallvec = "1.13.2"
tracing = { workspace = true }
void = "1"
wasm-bindgen-futures = { version = "0.4.42", optional = true }
[target.'cfg(not(any(target_os = "emscripten", target_os = "wasi", target_os = "unknown")))'.dependencies]
async-std = { version = "1.6.2", optional = true }
tokio = { workspace = true, features = ["rt"], optional = true }
[features]
macros = ["dep:libp2p-swarm-derive"]
tokio = ["dep:tokio"]
async-std = ["dep:async-std"]
wasm-bindgen = ["dep:wasm-bindgen-futures", "dep:getrandom"]
[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
either = "1.11.0"
futures = { workspace = true }
libp2p-identify = { path = "../protocols/identify" }
libp2p-identity = { workspace = true, features = ["ed25519"] }
libp2p-kad = { path = "../protocols/kad" }
libp2p-ping = { path = "../protocols/ping" }
libp2p-plaintext = { path = "../transports/plaintext" }
libp2p-swarm-derive = { path = "../swarm-derive" }
libp2p-swarm-test = { path = "../swarm-test" }
libp2p-yamux = { path = "../muxers/yamux" }
quickcheck = { workspace = true }
void = "1"
once_cell = "1.19.0"
trybuild = "1.0.91"
tokio = { workspace = true, features = ["time", "rt", "macros", "rt-multi-thread"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[[test]]
name = "swarm_derive"
required-features = ["macros"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true