Skip to content

Commit b31fa45

Browse files
committed
Add cli subcommand
1 parent 2337e46 commit b31fa45

File tree

7 files changed

+1388
-9
lines changed

7 files changed

+1388
-9
lines changed

Cargo.lock

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ async-channel = "2.3.1"
1818
bao-tree = { version = "0.13", features = ["tokio_fsm", "validate"], default-features = false }
1919
bytes = { version = "1.7", features = ["serde"] }
2020
chrono = "0.4.31"
21+
clap = { version = "4.5.20", features = ["derive"], optional = true }
22+
console = { version = "0.15.8", optional = true }
2123
derive_more = { version = "1.0.0", features = ["debug", "display", "deref", "deref_mut", "from", "try_into", "into"] }
2224
futures-buffered = "0.2.4"
2325
futures-lite = "2.3"
2426
futures-util = { version = "0.3.30", optional = true }
2527
genawaiter = { version = "0.99.1", features = ["futures03"] }
2628
hashlink = { version = "0.9.0", optional = true }
2729
hex = "0.4.3"
30+
indicatif = { version = "0.17.8", optional = true }
2831
iroh-base = { version = "0.28.0", features = ["redb"] }
2932
iroh-io = { version = "0.6.0", features = ["stats"] }
3033
iroh-metrics = { version = "0.28.0", default-features = false }
@@ -76,13 +79,17 @@ futures-util = "0.3.30"
7679
testdir = "0.9.1"
7780

7881
[features]
79-
default = ["fs-store", "rpc", "net_protocol"]
82+
default = ["fs-store", "rpc", "net_protocol", "cli"]
8083
downloader = ["dep:parking_lot", "tokio-util/time", "dep:hashlink"]
8184
net_protocol = ["downloader"]
8285
fs-store = ["dep:reflink-copy", "redb", "dep:redb_v1", "dep:tempfile"]
8386
metrics = ["iroh-metrics/metrics"]
8487
redb = ["dep:redb"]
88+
cli = ["dep:clap", "dep:indicatif", "dep:console"]
8589
rpc = ["dep:quic-rpc", "dep:quic-rpc-derive", "dep:nested_enum_utils", "dep:strum", "dep:futures-util", "dep:ref-cast", "dep:portable-atomic", "dep:walkdir", "downloader"]
90+
clap = ["dep:clap"]
91+
console = ["dep:console"]
92+
indicatif = ["dep:indicatif"]
8693

8794
[package.metadata.docs.rs]
8895
all-features = true

0 commit comments

Comments
 (0)