[package] name = "libp2p-metrics" edition = "2021" rust-version = "1.65.0" description = "Metrics for libp2p" version = "0.12.0" authors = ["Max Inden "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [features] gossipsub = ["libp2p-gossipsub"] identify = ["libp2p-identify"] kad = ["libp2p-kad"] ping = ["libp2p-ping"] relay = ["libp2p-relay"] dcutr = ["libp2p-dcutr"] [dependencies] libp2p-core = { version = "0.39.0", path = "../../core" } libp2p-dcutr = { version = "0.9.0", path = "../../protocols/dcutr", optional = true } libp2p-identify = { version = "0.42.0", path = "../../protocols/identify", optional = true } libp2p-kad = { version = "0.43.0", path = "../../protocols/kad", optional = true } libp2p-ping = { version = "0.42.0", path = "../../protocols/ping", optional = true } libp2p-relay = { version = "0.15.0", path = "../../protocols/relay", optional = true } libp2p-swarm = { version = "0.42.0", path = "../../swarm" } prometheus-client = "0.19.0" [target.'cfg(not(target_os = "unknown"))'.dependencies] libp2p-gossipsub = { version = "0.44.0", path = "../../protocols/gossipsub", optional = true } [dev-dependencies] env_logger = "0.10.0" futures = "0.3.26" hyper = { version="0.14", features = ["server", "tcp", "http1"] } libp2p-noise = { path = "../../transports/noise" } libp2p-ping = { path = "../../protocols/ping" } libp2p-swarm = { path = "../../swarm", features = ["macros"] } libp2p-tcp = { path = "../../transports/tcp", features = ["async-io"] } libp2p-yamux = { path = "../../muxers/yamux" } log = "0.4.0" tokio = { version = "1", features = ["rt-multi-thread"] } # Passing arguments to the docsrs builder in order to properly document cfg's. # More information: https://docs.rs/about/builds#cross-compiling [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] rustc-args = ["--cfg", "docsrs"] [[example]] name = "metrics" required-features = ["ping", "identify"]