Skip to content

Commit

Permalink
cleanup dependencies and features
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Nov 28, 2024
1 parent b58ebd2 commit 35be5d6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 179 deletions.
129 changes: 1 addition & 128 deletions Cargo.lock

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

3 changes: 0 additions & 3 deletions iroh-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ iroh-relay = { version = "0.28", path = "../iroh-relay", features = ["test-utils
name = "key"
harness = false

[build-dependencies]
duct = "0.13.6"

[features]
default = ["metrics", "discovery-pkarr-dht"]
metrics = ["iroh-metrics/metrics"]
Expand Down
68 changes: 22 additions & 46 deletions iroh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,39 @@ rust-version = "1.76"
workspace = true

[dependencies]
anyhow = { version = "1" }
async-channel = "2.3.1"
bytes = "1.7"
derive_more = { version = "1.0.0", features = [
"debug",
"display",
"from",
"try_into",
"from_str",
] }
futures-lite = "2.5"
futures-util = "0.3"
iroh-base = { version = "0.28.0", features = ["key"] }
iroh-io = { version = "0.6.0", features = ["stats"] }
iroh-metrics = { version = "0.28.0", optional = true }
iroh-net = { version = "0.28.1", features = ["discovery-local-network"] }
iroh-node-util = { version = "0.28.0", path = "../iroh-node-util" }
iroh-net = { version = "0.28.1", default-features = false }
iroh-router = { version = "0.28.0" }
nested_enum_utils = "0.1.0"
num_cpus = { version = "1.15.0" }
parking_lot = "0.12.1"
postcard = { version = "1", default-features = false, features = [
"alloc",
"use-std",
"experimental-derive",
] }
quic-rpc = { version = "0.15", default-features = false, features = [
"flume-transport",
"quinn-transport",
] }
quic-rpc-derive = { version = "0.15" }
quinn = { package = "iroh-quinn", version = "0.12" }
serde = { version = "1", features = ["derive"] }
strum = { version = "0.26", features = ["derive"] }
thiserror = "2"
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
anyhow = { version = "1", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
indicatif = { version = "0.17", features = ["tokio"], optional = true }
parse-size = { version = "=1.0.0", optional = true } # pinned version to avoid bumping msrv to 1.81
tokio = { version = "1", features = ["full"], optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
futures-lite = { version = "2.5", optional = true }
tracing = { version = "0.1", optional = true }
bytes = { version = "1.8", optional = true }

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

[features]
default = []

examples = ["dep:clap", "dep:indicatif", "dep:parse-size", "dep:tracing-subscriber"]

default = ["metrics", "discovery-pkarr-dht"]
metrics = ["iroh-net/metrics"]
discovery-local-network = ["iroh-net/discovery-local-network"]
discovery-pkarr-dht = ["iroh-net/discovery-pkarr-dht"]

examples = [
"dep:anyhow",
"dep:clap",
"dep:indicatif",
"dep:parse-size",
"dep:tokio",
"dep:tracing-subscriber",
"dep:futures-lite",
"dep:tracing",
"dep:bytes",
]

[package.metadata.docs.rs]
all-features = true
Expand Down
5 changes: 3 additions & 2 deletions iroh/examples/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ use clap::{Parser, Subcommand};
use futures_lite::StreamExt;
use indicatif::HumanBytes;
use iroh_net::{
key::SecretKey, ticket::NodeTicket, Endpoint, NodeAddr, RelayMap, RelayMode, RelayUrl,
endpoint::ConnectionError, key::SecretKey, ticket::NodeTicket, Endpoint, NodeAddr, RelayMap,
RelayMode, RelayUrl,
};
use tracing::info;

Expand Down Expand Up @@ -132,7 +133,7 @@ async fn provide(size: u64, relay_url: Option<String>) -> anyhow::Result<()> {
// it received this message.
let res = tokio::time::timeout(Duration::from_secs(3), async move {
let closed = conn.closed().await;
if !matches!(closed, quinn::ConnectionError::ApplicationClosed(_)) {
if !matches!(closed, ConnectionError::ApplicationClosed(_)) {
println!("node {node_id} disconnected with an error: {closed:#}");
}
})
Expand Down

0 comments on commit 35be5d6

Please sign in to comment.