@@ -15,12 +15,22 @@ rust-version = "1.76"
1515[dependencies ]
1616anyhow = { version = " 1" }
1717async-channel = " 2.3.1"
18- bao-tree = { version = " 0.13" , features = [" tokio_fsm" , " validate" ], default-features = false }
18+ bao-tree = { version = " 0.13" , features = [
19+ " tokio_fsm" ,
20+ " validate" ,
21+ ], default-features = false }
1922bytes = { version = " 1.7" , features = [" serde" ] }
2023chrono = " 0.4.31"
2124clap = { version = " 4.5.20" , features = [" derive" ], optional = true }
22- console = { version = " 0.15.8" , optional = true }
23- derive_more = { version = " 1.0.0" , features = [" debug" , " display" , " deref" , " deref_mut" , " from" , " try_into" , " into" ] }
25+ derive_more = { version = " 1.0.0" , features = [
26+ " debug" ,
27+ " display" ,
28+ " deref" ,
29+ " deref_mut" ,
30+ " from" ,
31+ " try_into" ,
32+ " into" ,
33+ ] }
2434futures-buffered = " 0.2.4"
2535futures-lite = " 2.3"
2636futures-util = { version = " 0.3.30" , optional = true }
@@ -38,14 +48,18 @@ num_cpus = "1.15.0"
3848oneshot = " 0.1.8"
3949parking_lot = { version = " 0.12.1" , optional = true }
4050portable-atomic = { version = " 1" , optional = true }
41- postcard = { version = " 1" , default-features = false , features = [" alloc" , " use-std" , " experimental-derive" ] }
51+ postcard = { version = " 1" , default-features = false , features = [
52+ " alloc" ,
53+ " use-std" ,
54+ " experimental-derive" ,
55+ ] }
4256quic-rpc = { version = " 0.15.1" , optional = true }
4357quic-rpc-derive = { version = " 0.15.0" , optional = true }
4458quinn = { package = " iroh-quinn" , version = " 0.12" , features = [" ring" ] }
4559rand = " 0.8"
4660range-collections = " 0.4.0"
4761redb = { version = " 2.2.0" , optional = true }
48- redb_v1 = { package = " redb" , version = " 1.5.1" , optional = true }
62+ redb_v1 = { package = " redb" , version = " 1.5.1" , optional = true }
4963ref-cast = { version = " 1.0.23" , optional = true }
5064reflink-copy = { version = " 0.1.8" , optional = true }
5165self_cell = " 1.0.1"
@@ -61,9 +75,14 @@ tracing = "0.1"
6175tracing-futures = " 0.2.5"
6276walkdir = { version = " 2.5.0" , optional = true }
6377
78+ # Examples
79+ iroh = { version = " 0.28" , optional = true }
80+ console = { version = " 0.15.8" , optional = true }
81+
6482[dev-dependencies ]
6583http-body = " 1.0"
6684iroh-test = { version = " 0.28" }
85+ iroh-net = { version = " 0.28" , features = [" test-utils" ] }
6786futures-buffered = " 0.2.4"
6887proptest = " 1.0.0"
6988serde_json = " 1.0.107"
@@ -78,14 +97,26 @@ futures-util = "0.3.30"
7897testdir = " 0.9.1"
7998
8099[features ]
81- default = [" fs-store" , " rpc" , " net_protocol" ]
100+ default = [" fs-store" , " rpc" , " net_protocol" , " example-iroh " ]
82101downloader = [" dep:parking_lot" , " tokio-util/time" , " dep:hashlink" ]
83102net_protocol = [" downloader" ]
84103fs-store = [" dep:reflink-copy" , " redb" , " dep:redb_v1" , " dep:tempfile" ]
85104metrics = [" iroh-metrics/metrics" ]
86105redb = [" dep:redb" ]
87106cli = [" rpc" , " dep:clap" , " dep:indicatif" , " dep:console" ]
88- 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" ]
107+ rpc = [
108+ " dep:quic-rpc" ,
109+ " dep:quic-rpc-derive" ,
110+ " dep:nested_enum_utils" ,
111+ " dep:strum" ,
112+ " dep:futures-util" ,
113+ " dep:ref-cast" ,
114+ " dep:portable-atomic" ,
115+ " dep:walkdir" ,
116+ " downloader" ,
117+ ]
118+
119+ example-iroh = [" dep:iroh" , " dep:clap" , " dep:indicatif" , " dep:console" ]
89120
90121[package .metadata .docs .rs ]
91122all-features = true
@@ -100,6 +131,22 @@ name = "fetch-fsm"
100131[[example ]]
101132name = " fetch-stream"
102133
134+ [[example ]]
135+ name = " hello-world-fetch"
136+ required-features = [" example-iroh" ]
137+
138+ [[example ]]
139+ name = " hello-world-provide"
140+ required-features = [" example-iroh" ]
141+
142+ [[example ]]
143+ name = " local-swarm-discovery"
144+ required-features = [" example-iroh" ]
145+
146+ [[example ]]
147+ name = " custom-protocol"
148+ required-features = [" example-iroh" ]
149+
103150[lints .rust ]
104151missing_debug_implementations = " warn"
105152
@@ -134,4 +181,4 @@ iroh-router = { git = "https://github.com/n0-computer/iroh", branch = "main" }
134181iroh-net = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
135182iroh-metrics = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
136183iroh-base = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
137-
184+ iroh = { git = " https://github.com/n0-computer/iroh " , branch = " main " }
0 commit comments