-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCargo.toml
191 lines (170 loc) · 5.45 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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
[package]
name = "iroh-blobs"
version = "0.33.0"
edition = "2021"
readme = "README.md"
description = "blob and collection transfer support for iroh"
license = "MIT OR Apache-2.0"
authors = ["dignifiedquire <[email protected]>", "n0 team"]
repository = "https://github.com/n0-computer/iroh-blobs"
keywords = ["hashing", "quic", "blake3"]
# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.81"
[dependencies]
anyhow = { version = "1" }
async-channel = "2.3.1"
bao-tree = { version = "0.13", features = [
"tokio_fsm",
"validate",
], default-features = false }
blake3 = { version = "1.4.5", package = "iroh-blake3" }
bytes = { version = "1.7", features = ["serde"] }
chrono = "0.4.31"
clap = { version = "4.5.20", features = ["derive"], optional = true }
data-encoding = { version = "2.3.3" }
derive_more = { version = "1.0.0", features = [
"debug",
"display",
"deref",
"deref_mut",
"from",
"try_into",
"into",
] }
futures-buffered = "0.2.4"
futures-lite = "2.3"
futures-util = { version = "0.3.30", optional = true }
genawaiter = { version = "0.99.1", features = ["futures03"] }
hashlink = { version = "0.9.0", optional = true }
hex = "0.4.3"
indicatif = { version = "0.17.8", optional = true }
iroh-base = { version = "0.33" }
iroh-io = { version = "0.6.0", features = ["stats"] }
iroh-metrics = { version = "0.31", default-features = false }
iroh = "0.33"
nested_enum_utils = { version = "0.1.0", optional = true }
num_cpus = "1.15.0"
oneshot = "0.1.8"
parking_lot = { version = "0.12.1", optional = true }
portable-atomic = { version = "1", optional = true }
postcard = { version = "1", default-features = false, features = [
"alloc",
"use-std",
"experimental-derive",
] }
quic-rpc = { version = "0.18", optional = true }
quic-rpc-derive = { version = "0.18", optional = true }
rand = "0.8"
range-collections = "0.4.0"
redb = { version = "2.2.0", optional = true }
reflink-copy = { version = "0.1.8", optional = true }
self_cell = "1.0.1"
serde = { version = "1", features = ["derive"] }
serde-error = "0.1.3"
smallvec = { version = "1.10.0", features = ["serde", "const_new"] }
strum = { version = "0.26.3", optional = true }
ssh-key = { version = "0.6", optional = true, features = ["ed25519"] }
tempfile = { version = "3.10.0", optional = true }
thiserror = "2"
tokio = { version = "1", features = ["fs"] }
tokio-util = { version = "0.7", features = ["io-util", "io"] }
tracing = "0.1"
tracing-futures = "0.2.5"
walkdir = { version = "2.5.0", optional = true }
# Examples
console = { version = "0.15.8", optional = true }
tracing-test = "0.2.5"
[dev-dependencies]
http-body = "1.0"
iroh = { version = "0.33", features = ["test-utils"] }
quinn = { package = "iroh-quinn", version = "0.13", features = ["ring"] }
futures-buffered = "0.2.4"
proptest = "1.0.0"
serde_json = "1.0.107"
serde_test = "1.0.176"
testresult = "0.4.0"
tokio = { version = "1", features = ["macros", "test-util"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
rcgen = "0.13"
rustls = { version = "0.23", default-features = false, features = ["ring"] }
tempfile = "3.10.0"
futures-util = "0.3.30"
testdir = "0.9.1"
[features]
default = ["fs-store", "net_protocol"]
downloader = ["dep:parking_lot", "tokio-util/time", "dep:hashlink"]
net_protocol = ["downloader", "dep:futures-util"]
fs-store = ["dep:reflink-copy", "redb", "dep:tempfile"]
metrics = ["iroh-metrics/metrics"]
redb = ["dep:redb"]
cli = ["rpc", "dep:clap", "dep:indicatif", "dep:console"]
rpc = [
"dep:quic-rpc",
"dep:quic-rpc-derive",
"dep:nested_enum_utils",
"dep:strum",
"dep:futures-util",
"dep:portable-atomic",
"dep:walkdir",
"dep:ssh-key",
"downloader",
]
example-iroh = [
"dep:clap",
"dep:indicatif",
"dep:console",
"iroh/discovery-local-network"
]
test = ["quic-rpc/quinn-transport", "quic-rpc/test-utils"]
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "iroh_docsrs"]
[[example]]
name = "provide-bytes"
[[example]]
name = "fetch-fsm"
[[example]]
name = "fetch-stream"
[[example]]
name = "transfer"
required-features = ["rpc"]
[[example]]
name = "hello-world-fetch"
required-features = ["example-iroh"]
[[example]]
name = "hello-world-provide"
required-features = ["example-iroh"]
[[example]]
name = "local-swarm-discovery"
required-features = ["example-iroh"]
[[example]]
name = "custom-protocol"
required-features = ["example-iroh"]
[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"
[profile.dev-ci]
inherits = 'dev'
opt-level = 1
[profile.optimized-release]
inherits = 'release'
debug = false
lto = true
debug-assertions = false
opt-level = 3
panic = 'abort'
incremental = false
[patch.crates-io]
iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
quic-rpc = { git = "https://github.com/n0-computer/quic-rpc.git", branch = "main" }
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }