-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathCargo.toml
More file actions
172 lines (152 loc) · 4.45 KB
/
Copy pathCargo.toml
File metadata and controls
172 lines (152 loc) · 4.45 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[package]
name = "iroh-gossip"
version = "0.94.0"
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"
resolver = "2"
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.85"
[lib]
crate-type = ["cdylib", "rlib"]
[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]
blake3 = "1.8"
bytes = { version = "1.7", features = ["serde"] }
data-encoding = "2.6.0"
derive_more = { version = "2.0.1", features = [
"add",
"debug",
"deref",
"display",
"from",
"try_into",
"into",
] }
ed25519-dalek = { version = "3.0.0-pre.1", features = ["serde", "rand_core"] }
hex = "0.4.3"
indexmap = "2.0"
iroh-metrics = { version = "0.37", default-features = false }
iroh-base = { version = "0.95", default-features = false, features = ["key"] }
n0-future = "0.3"
postcard = { version = "1", default-features = false, features = [
"alloc",
"use-std",
"experimental-derive",
] }
rand = { version = "0.9.2", features = ["std_rng"] }
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 = { version = "0.95", default-features = false, optional = true }
tokio = { version = "1", optional = true, features = ["io-util", "sync"] }
tokio-util = { version = "0.7.12", optional = true, features = ["codec"] }
tracing = "0.1"
irpc = { version = "0.11.0", optional = true, default-features = false, features = [
"derive",
"stream",
"spans",
] }
n0-error = { version = "0.1", features = ["anyhow"] }
# rpc dependencies (optional)
quinn = { package = "iroh-quinn", version = "0.14.0", optional = true }
# test-utils dependencies (optional)
rand_chacha = { version = "0.9", optional = true }
humantime-serde = { version = "1.1.1", optional = true }
# simulator dependencies (optional)
clap = { version = "4", features = ["derive"], optional = true }
toml = { version = "0.9.8", optional = true }
tracing-subscriber = { version = "0.3", features = [
"env-filter",
], optional = true }
serde_json = { version = "1", optional = true }
rayon = { version = "1.10.0", optional = true }
comfy-table = { version = "7.1.4", optional = true }
[dev-dependencies]
tokio = { version = "1", features = [
"io-util",
"sync",
"rt",
"macros",
"net",
"fs",
] }
clap = { version = "4", features = ["derive"] }
humantime-serde = { version = "1.1.1" }
iroh = { version = "0.95", default-features = false, features = [
"metrics",
"test-utils",
] }
rand_chacha = "0.9"
testresult = "0.4.1"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
tracing-test = "0.2.5"
url = "2.4.0"
serde-byte-array = "0.1.2"
[features]
default = ["net", "metrics"]
net = [
"dep:irpc",
"dep:futures-lite",
"dep:iroh",
"dep:tokio",
"dep:tokio-util",
"dep:futures-util",
"dep:futures-concurrency",
]
rpc = [
"dep:irpc",
"dep:tokio",
"dep:quinn",
"irpc/rpc",
"irpc/quinn_endpoint_setup",
]
test-utils = ["dep:rand_chacha", "dep:humantime-serde"]
simulator = [
"test-utils",
"dep:tracing-subscriber",
"dep:toml",
"dep:clap",
"dep:serde_json",
"dep:rayon",
"dep:comfy-table",
]
metrics = ["iroh-metrics/metrics"]
examples = ["net"]
[[test]]
name = "sim"
path = "tests/sim.rs"
required-features = ["test-utils"]
[[bin]]
name = "sim"
required-features = ["simulator"]
[[example]]
name = "chat"
required-features = ["examples"]
[[example]]
name = "setup"
required-features = ["examples"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]
[profile.bench]
debug = true
[profile.release]
debug = true