Skip to content

Commit

Permalink
start updating examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Nov 19, 2024
1 parent cff6016 commit dda20df
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 336 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 7 additions & 13 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,25 @@ tempfile = "3.4"
tokio = { version = "1", features = ["io-util", "rt"] }
tokio-util = { version = "0.7", features = ["codec", "io-util", "io", "time"] }
tracing = "0.1"
iroh-relay = { version = "0.28", path = "../iroh-relay" }
ref-cast = "1.0.23"

# Examples
clap = { version = "4", features = ["derive"], optional = true }
indicatif = { version = "0.17", features = ["tokio"], optional = true }
ref-cast = "1.0.23"
console = { version = "0.15.5", optional = true }
iroh-blobs = { version = "0.28", optional = true, features = ["rpc"] }

# Documentation tests
url = { version = "2.5.0", features = ["serde"] }
serde-error = "0.1.3"

[features]
default = ["metrics", "fs-store"]
default = ["metrics", "fs-store", "examples"]
metrics = ["iroh-metrics"]
fs-store = []
test = []
examples = ["dep:clap", "dep:indicatif"]
examples = ["dep:clap", "dep:indicatif", "dep:iroh-blobs"]
discovery-local-network = [
"iroh-net/discovery-local-network",
"examples",
Expand Down Expand Up @@ -106,22 +108,14 @@ rustdoc-args = ["--cfg", "iroh_docsrs"]

[[example]]
name = "hello-world-provide"
required-features = ["examples"]

[[example]]
name = "hello-world-fetch"

[[example]]
name = "collection-provide"

[[example]]
name = "collection-fetch"

[[example]]
name = "rpc"
required-features = ["examples"]

[[example]]
name = "client"
name = "rpc"
required-features = ["examples"]

[[example]]
Expand Down
43 changes: 0 additions & 43 deletions iroh/examples/client.rs

This file was deleted.

94 changes: 0 additions & 94 deletions iroh/examples/collection-fetch.rs

This file was deleted.

73 changes: 0 additions & 73 deletions iroh/examples/collection-provide.rs

This file was deleted.

3 changes: 1 addition & 2 deletions iroh/examples/custom-protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ use anyhow::Result;
use clap::Parser;
use futures_lite::future::Boxed as BoxedFuture;
use iroh::{
blobs::Hash,
client::blobs,
net::{
endpoint::{get_remote_node_id, Connecting},
Endpoint, NodeId,
},
router::ProtocolHandler,
};
use iroh_base::hash::Hash;
use tracing_subscriber::{prelude::*, EnvFilter};

#[derive(Debug, Parser)]
Expand Down
Loading

0 comments on commit dda20df

Please sign in to comment.