radio/iroh/Cargo.toml

[package]
name = "iroh"
version = "0.96.1"
edition = "2024"
readme = "README.md"
description = "p2p quic connections dialed by public key"
license = "MIT OR Apache-2.0"
authors = ["dignifiedquire <me@dignifiedquire.com>", "n0 team"]
repository = "https://github.com/n0-computer/iroh"
keywords = ["quic", "networking", "holepunching", "p2p"]

# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.89"

[lib]
# We need "cdylib" to actually generate .wasm files when we run with --target=wasm32-unknown-unknown.
# It would be nice if we could make this target-dependent, but we can't (yet): https://github.com/rust-lang/cargo/issues/12260
crate-type = ["lib", "cdylib"]

[lints]
workspace = true

[dependencies]
backon = { version = "1.4" }
bytes = "1.11"
data-encoding = "2.2"
derive_more = { version = "2.0.1", features = ["debug", "display", "from", "try_into", "deref", "from_str", "into_iterator"] }
ed25519-dalek = { version = "3.0.0-pre.1", features = ["serde", "rand_core", "zeroize", "pkcs8", "pem"] }
http = "1"
iroh-base = { version = "0.96.1", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
iroh-relay = { version = "0.96", path = "../iroh-relay", default-features = false }
n0-future = "0.3"
n0-error = "0.1"
n0-watcher = "0.6"
netwatch = { version = "0.14" }
papaya = { version = "0.2.3", default-features = false }
pin-project = "1"
pkarr = { version = "5", default-features = false, features = ["relays"] }
quinn = { package = "iroh-quinn", version = "0.16.1", default-features = false, features = ["rustls-ring"] }
quinn-proto = { package = "iroh-quinn-proto", version = "0.15.1" }
quinn-udp = { package = "iroh-quinn-udp", version = "0.8" }
rand = "0.9.2"
reqwest = { version = "0.12", default-features = false, features = [
    "rustls-tls",
    "stream",
] }
rustc-hash = "2"
rustls = { version = "0.23.33", default-features = false, features = ["ring"] }
serde = { version = "1.0.219", features = ["derive", "rc"] }
smallvec = "1.11.1"
strum = { version = "0.27", features = ["derive"] }
tokio = { version = "1.44.1", features = [
    "io-util",
    "macros",
    "sync",
    "rt",
] }
tokio-stream = { version = "0.1.15", features = ["sync"] }
tokio-util = { version = "0.7", features = ["io-util", "io", "rt"] }
tracing = "0.1"
url = { version = "2.5", features = ["serde"] }
webpki = { package = "rustls-webpki", version = "0.103.7", features = ["ring"] }
webpki_types = { package = "rustls-pki-types", version = "1.12" }
webpki-roots = "1.0.3"
pkcs8 = "0.11.0-rc.9"

# metrics
iroh-metrics = { version = "0.38", default-features = false }

# mdns
swarm-discovery = { version = "0.5", optional = true }
futures-util = "0.3"

# test_utils
axum = { version = "0.8", optional = true }
sync_wrapper = { version = "1.0.2", features = ["futures"] }

# non-wasm-in-browser dependencies
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
hickory-resolver = "0.25.1"
igd-next = { version = "0.16", features = ["aio_tokio"] }
netdev = { version = "0.40.0" }
portmapper = { version = "0.14", default-features = false }
quinn = { package = "iroh-quinn", version = "0.16.1", default-features = false, features = ["runtime-tokio", "rustls-ring"] }
tokio = { version = "1", features = [
    "io-util",
    "macros",
    "sync",
    "rt",
    "net",
    "fs",
    "io-std",
    "signal",
    "process",
] }

# wasm-in-browser dependencies
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
wasm-bindgen-futures = "0.4"
# we don't use time directly, but need to enable it because x509_parser uses these in browsers and we need to enable some feature flags for that to work
time = { version = "0.3", features = ["wasm-bindgen"] }
getrandom = { version = "0.3.2", features = ["wasm_js"] }

# target-common test/dev dependencies
[dev-dependencies]
console_error_panic_hook = "0.1"
postcard = { version = "1.1.1", features = ["use-std"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
rand_chacha = "0.9"
chrono = "0.4.43"

# *non*-wasm-in-browser test/dev dependencies
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies]
axum = { version = "0.8" }
pretty_assertions = "1.4"
rand_chacha = "0.9"
tokio = { version = "1", features = [
    "io-util",
    "sync",
    "rt",
    "net",
    "fs",
    "macros",
    "time",
    "test-util",
] }
serde_json = "1"
iroh-relay = { path = "../iroh-relay", default-features = false, features = ["test-utils", "server"] }
n0-tracing-test = "0.3"
clap = { version = "4", features = ["derive"] }
tracing-subscriber = { version = "0.3", features = [
    "env-filter",
] }
indicatif = { version = "0.18", features = ["tokio"] }
parse-size = { version = "1.1.0", features = ['std'] }
iroh-base = { version = "0.96.1", default-features = false, features = ["key", "relay"], path = "../iroh-base" }
console = { version = "0.16" }

# wasm-in-browser test/dev dependencies
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dev-dependencies]
wasm-tracing = "2.1.0"
wasm-bindgen-test = "0.3"

[build-dependencies]
cfg_aliases = { version = "0.2.1" }

[features]
default = ["metrics", "fast-apple-datapath"]
metrics = ["iroh-metrics/metrics", "iroh-relay/metrics", "portmapper/metrics"]
test-utils = ["iroh-relay/test-utils", "iroh-relay/server", "dep:axum"]
address-lookup-mdns = ["dep:swarm-discovery"]
address-lookup-pkarr-dht = ["pkarr/dht"]
qlog = ["quinn/qlog"]
# Use private Apple APIs to send multiple packets in a single syscall.
fast-apple-datapath = ["quinn/fast-apple-datapath"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]

test
name = "integration"
path = "tests/integration.rs"

example
name = "listen"
required-features = []

example
name = "connect"
required-features = []

example
name = "listen-unreliable"
required-features = []

example
name = "connect-unreliable"
required-features = []

example
name = "dht_address_lookup"
required-features = ["address-lookup-pkarr-dht"]

example
name = "mdns_address_lookup"
required-features = ["address-lookup-mdns"]

example
name = "search"
required-features = []

example
name = "echo"
required-features = []

example
name = "echo-no-router"
required-features = []

example
name = "transfer"
required-features = []

example
name = "0rtt"
required-features = []

Synonyms

nox/Cargo.toml
optica/Cargo.toml
rs/Cargo.toml
cw-cyber/Cargo.toml
zheng/Cargo.toml
trident/Cargo.toml
honeycrisp/Cargo.toml
bbg/Cargo.toml
lens/Cargo.toml
radio/Cargo.toml
hemera/Cargo.toml
strata/Cargo.toml
strata/compute/Cargo.toml
rs/rsc/Cargo.toml
lens/binius/Cargo.toml
radio/iroh-base/Cargo.toml
hemera/bench/Cargo.toml
radio/iroh-blobs/Cargo.toml
cyb/cyb-boot/Cargo.toml
radio/iroh-ffi/Cargo.toml
hemera/wgsl/Cargo.toml
strata/proof/Cargo.toml
radio/particle/Cargo.toml
rs/macros/Cargo.toml
radio/iroh-gossip/Cargo.toml
cyb/src-tauri/Cargo.toml
honeycrisp/rane/Cargo.toml
honeycrisp/unimem/Cargo.toml
lens/src/Cargo.toml
rs/core/Cargo.toml
radio/radio-cli/Cargo.toml
strata/core/Cargo.toml
cyb/cyb/Cargo.toml
nox/rs/Cargo.toml
hemera/cli/Cargo.toml
radio/iroh-dns-server/Cargo.toml
nox/cli/Cargo.toml
hemera/rs/Cargo.toml
radio/iroh-docs/Cargo.toml
lens/ikat/Cargo.toml
lens/core/Cargo.toml
radio/iroh-car/Cargo.toml
strata/ext/Cargo.toml
nox/metal/Cargo.toml
radio/cyber-bao/Cargo.toml
strata/src/Cargo.toml
bostrom-mcp/rust/Cargo.toml
rs/mir-format/Cargo.toml
radio/iroh-willow/Cargo.toml
radio/iroh-relay/Cargo.toml
lens/assayer/Cargo.toml
honeycrisp/aruminium/Cargo.toml
honeycrisp/acpu/Cargo.toml
lens/brakedown/Cargo.toml
lens/porphyry/Cargo.toml
cw-cyber/contracts/std-test/Cargo.toml
strata/genies/cli/Cargo.toml
strata/jali/rs/Cargo.toml
cw-cyber/contracts/hub-channels/Cargo.toml
cw-cyber/contracts/hub-libs/Cargo.toml
strata/kuro/cli/Cargo.toml
cw-cyber/contracts/litium-core/Cargo.toml
cw-cyber/contracts/litium-refer/Cargo.toml
cyb/cyb/cyb-services/Cargo.toml
strata/nebu/rs/Cargo.toml
radio/iroh-ffi/iroh-js/Cargo.toml
cw-cyber/contracts/cw-cyber-subgraph/Cargo.toml
cw-cyber/packages/cyber-std-test/Cargo.toml
rs/tests/macro-integration/Cargo.toml
strata/kuro/rs/Cargo.toml
strata/nebu/wgsl/Cargo.toml
cw-cyber/contracts/graph-filter/Cargo.toml
cw-cyber/contracts/litium-wrap/Cargo.toml
radio/tests/integration/Cargo.toml
strata/trop/rs/Cargo.toml
honeycrisp/aruminium/benches/Cargo.toml
cw-cyber/contracts/hub-tokens/Cargo.toml
strata/trop/wgsl/Cargo.toml
radio/iroh/bench/Cargo.toml
cw-cyber/contracts/cw-cyber-gift/Cargo.toml
cw-cyber/contracts/litium-mine/Cargo.toml
cyb/cyb/cyb-ui/Cargo.toml
trident/editor/zed/Cargo.toml
cw-cyber/contracts/cw-cyber-passport/Cargo.toml
strata/jali/cli/Cargo.toml
strata/jali/wgsl/Cargo.toml
cw-cyber/contracts/hub-protocols/Cargo.toml
cw-cyber/contracts/hub-skills/Cargo.toml
strata/nebu/cli/Cargo.toml
cw-cyber/packages/hub-base/Cargo.toml
honeycrisp/rane/benches/Cargo.toml
strata/trop/cli/Cargo.toml
strata/kuro/wgsl/Cargo.toml
cw-cyber/packages/cyber-std/Cargo.toml
cw-cyber/contracts/cybernet/Cargo.toml
cyb/cyb/cyb-shell/Cargo.toml
cw-cyber/tests/litium-tests/Cargo.toml
cw-cyber/contracts/hub-networks/Cargo.toml
strata/genies/rs/Cargo.toml
strata/genies/wgsl/Cargo.toml
cw-cyber/contracts/litium-stake/Cargo.toml
cyb/cyb/cyb-portal/Cargo.toml
honeycrisp/unimem/experiments/iosurface_probe/Cargo.toml
honeycrisp/unimem/experiments/hyp_probe/Cargo.toml
honeycrisp/unimem/experiments/dext_contiguous_alloc/client/Cargo.toml
honeycrisp/unimem/experiments/dext_iosurface_pa/client/Cargo.toml

Neighbours