-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
99 lines (87 loc) · 3.38 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[package]
name = "iroh-gossip"
version = "0.28.1"
edition = "2021"
readme = "README.md"
description = "gossip messages over broadcast trees"
license = "MIT/Apache-2.0"
authors = ["n0 team"]
repository = "https://github.com/n0-computer/iroh-gossip"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.76"
[lints.rust]
missing_debug_implementations = "warn"
# We use this --cfg for documenting the cargo features on which an API
# is available. To preview this locally use: RUSTFLAGS="--cfg
# iroh_docsrs cargo +nightly doc --all-features". We use our own
# iroh_docsrs instead of the common docsrs to avoid also enabling this
# feature in any dependencies, because some indirect dependencies
# require a feature enabled when using `--cfg docsrs` which we can not
# do. To enable for a crate set `#![cfg_attr(iroh_docsrs,
# feature(doc_cfg))]` in the crate.
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)"] }
[lints.clippy]
unused-async = "warn"
[dependencies]
anyhow = { version = "1" }
async-channel = { version = "2.3.1", optional = true }
blake3 = { package = "iroh-blake3", version = "1.4.5"}
bytes = { version = "1.7", features = ["serde"] }
derive_more = { version = "1.0.0", features = ["add", "debug", "deref", "display", "from", "try_into", "into"] }
ed25519-dalek = { version = "2.0.0", features = ["serde", "rand_core"] }
indexmap = "2.0"
iroh-base = "0.28.0"
iroh-metrics = "0.28.0"
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"] }
rand = { version = "0.8.5", features = ["std_rng"] }
rand_core = "0.6.4"
serde = { version = "1.0.164", features = ["derive"] }
# net dependencies (optional)
futures-lite = { version = "2.3", optional = true }
futures-concurrency = { version = "7.6.1", optional = true }
futures-util = { version = "0.3.30", optional = true }
iroh-net = { version = "0.28.1", features = ["metrics"], optional = true, default-features = false }
iroh-router = { version = "0.28.0", optional = true }
tokio = { version = "1", optional = true, features = ["io-util", "sync", "rt", "macros", "net", "fs"] }
tokio-util = { version = "0.7.12", optional = true, features = ["codec", "rt"] }
tracing = "0.1"
# rpc dependencies (optional)
nested_enum_utils = { version = "0.1.0", optional = true }
quic-rpc = { version = "0.15.1", optional = true }
quic-rpc-derive = { version = "0.15.0", optional = true }
strum = { version = "0.26", optional = true }
serde-error = "0.1.3"
[dev-dependencies]
clap = { version = "4", features = ["derive"] }
iroh-net = { version = "0.28.1", default-features = false, features = ["metrics", "test-utils"] }
iroh-test = "0.28.0"
rand_chacha = "0.3.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = "2.4.0"
[features]
default = ["net", "rpc"]
net = [
"dep:futures-lite",
"dep:iroh-net",
"dep:iroh-router",
"dep:tokio",
"dep:tokio-util",
"dep:async-channel",
"dep:futures-util",
"dep:futures-concurrency"
]
rpc = [
"dep:nested_enum_utils",
"dep:quic-rpc",
"dep:quic-rpc-derive",
"dep:strum",
]
[[example]]
name = "chat"
required-features = ["net"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]
[patch.crates-io]
iroh-net = { git = "https://github.com/n0-computer/iroh", branch = "main" }
iroh-router = { git = "https://github.com/n0-computer/iroh", branch = "main" }