[package]
name = "libp2p"
edition = "2021"
rust-version = { workspace = true }
description = "Peer-to-peer networking library"
version = "0.53.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"]
[features]
full = [
"async-std",
"autonat",
"cbor",
"dcutr",
"dns",
"ecdsa",
"ed25519",
"floodsub",
"gossipsub",
"identify",
"json",
"kad",
"macros",
"mdns",
"memory-connection-limits",
"metrics",
"noise",
"ping",
"plaintext",
"pnet",
"quic",
"relay",
"rendezvous",
"request-response",
"rsa",
"secp256k1",
"serde",
"tcp",
"tls",
"tokio",
"uds",
"wasm-bindgen",
"websocket-websys",
"websocket",
"webtransport-websys",
"yamux",
"upnp",
]
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"]
dns = ["dep:libp2p-dns"]
ecdsa = ["libp2p-identity/ecdsa"]
ed25519 = ["libp2p-identity/ed25519"]
floodsub = ["dep:libp2p-floodsub"]
gossipsub = ["dep:libp2p-gossipsub", "libp2p-metrics?/gossipsub"]
identify = ["dep:libp2p-identify", "libp2p-metrics?/identify"]
json = ["libp2p-request-response?/json"]
kad = ["dep:libp2p-kad", "libp2p-metrics?/kad"]
macros = ["libp2p-swarm/macros"]
mdns = ["dep:libp2p-mdns"]
memory-connection-limits = ["dep:libp2p-memory-connection-limits"]
metrics = ["dep:libp2p-metrics"]
noise = ["dep:libp2p-noise"]
ping = ["dep:libp2p-ping", "libp2p-metrics?/ping"]
plaintext = ["dep:libp2p-plaintext"]
pnet = ["dep:libp2p-pnet"]
quic = ["dep:libp2p-quic"]
relay = ["dep:libp2p-relay", "libp2p-metrics?/relay"]
rendezvous = ["dep:libp2p-rendezvous"]
request-response = ["dep:libp2p-request-response"]
rsa = ["libp2p-identity/rsa"]
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"]
uds = ["dep:libp2p-uds"]
wasm-bindgen = [ "futures-timer/wasm-bindgen", "instant/wasm-bindgen", "getrandom/js", "libp2p-swarm/wasm-bindgen", "libp2p-gossipsub?/wasm-bindgen",]
websocket-websys = ["dep:libp2p-websocket-websys"]
websocket = ["dep:libp2p-websocket"]
webtransport-websys = ["dep:libp2p-webtransport-websys"]
yamux = ["dep:libp2p-yamux"]
upnp = ["dep:libp2p-upnp"]
[dependencies]
bytes = "1"
either = "1.9.0"
futures = "0.3.26"
futures-timer = "3.0.2"
getrandom = "0.2.3"
instant = "0.1.12"
rw-stream-sink = { workspace = true }
libp2p-allow-block-list = { workspace = true }
libp2p-autonat = { workspace = true, optional = true }
libp2p-connection-limits = { workspace = true }
libp2p-core = { workspace = true }
libp2p-dcutr = { workspace = true, optional = true }
libp2p-floodsub = { workspace = true, optional = true }
libp2p-gossipsub = { workspace = true, optional = true }
libp2p-identify = { workspace = true, optional = true }
libp2p-identity = { workspace = true, features = ["rand"] }
libp2p-kad = { workspace = true, optional = true }
libp2p-metrics = { workspace = true, optional = true }
libp2p-noise = { workspace = true, optional = true }
libp2p-ping = { workspace = true, optional = true }
libp2p-plaintext = { workspace = true, optional = true }
libp2p-pnet = { workspace = true, optional = true }
libp2p-relay = { workspace = true, optional = true }
libp2p-rendezvous = { workspace = true, optional = true }
libp2p-request-response = { workspace = true, optional = true }
libp2p-swarm = { workspace = true }
libp2p-websocket-websys = { workspace = true, optional = true }
libp2p-webtransport-websys = { workspace = true, optional = true }
libp2p-yamux = { workspace = true, optional = true }
multiaddr = { workspace = true }
pin-project = "1.0.0"
thiserror = "1.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
libp2p-dns = { workspace = true, optional = true }
libp2p-mdns = { workspace = true, optional = true }
libp2p-memory-connection-limits = { workspace = true, optional = true }
libp2p-quic = { workspace = true, optional = true }
libp2p-tcp = { workspace = true, optional = true }
libp2p-tls = { workspace = true, optional = true }
libp2p-uds = { workspace = true, optional = true }
libp2p-upnp = { workspace = true, optional = true }
libp2p-websocket = { workspace = true, optional = true }
[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
async-trait = "0.1"
clap = { version = "4.1.6", features = ["derive"] }
tokio = { version = "1.15", features = [ "io-util", "io-std", "macros", "rt", "rt-multi-thread"] }
libp2p-mplex = { workspace = true }
libp2p-noise = { workspace = true }
libp2p-tcp = { workspace = true, features = ["tokio"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]
[lints]
workspace = true