Skip to content

Commit 7f6841d

Browse files
authored
Merge 1bd5271 into 1f79c18
2 parents 1f79c18 + 1bd5271 commit 7f6841d

38 files changed

+640
-601
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ derive_more = { version = "2.0.1", features = ["from", "try_from", "into", "debu
1919
futures-lite = "2.6.0"
2020
quinn = { package = "iroh-quinn", version = "0.14.0" }
2121
n0-future = "0.3.0"
22-
n0-snafu = "0.2.2"
2322
range-collections = { version = "0.4.6", features = ["serde"] }
2423
smallvec = { version = "1", features = ["serde", "const_new"] }
25-
snafu = "0.8.5"
2624
tokio = { version = "1.43.0", features = ["full"] }
2725
tokio-util = { version = "0.7.13", features = ["full"] }
2826
tracing = "0.1.41"
@@ -33,7 +31,6 @@ serde = "1.0.217"
3331
postcard = { version = "1.1.1", features = ["experimental-derive", "use-std"] }
3432
data-encoding = "2.8.0"
3533
chrono = "0.4.39"
36-
nested_enum_utils = "0.2.1"
3734
ref-cast = "1.0.24"
3835
arrayvec = "0.7.6"
3936
iroh = "0.94"
@@ -42,9 +39,11 @@ genawaiter = { version = "0.99.1", features = ["futures03"] }
4239
iroh-base = "0.94"
4340
iroh-tickets = "0.1"
4441
irpc = { version = "0.10.0", features = ["rpc", "quinn_endpoint_setup", "spans", "stream", "derive"], default-features = false }
45-
iroh-metrics = { version = "0.36" }
42+
iroh-metrics = { version = "0.37" }
4643
redb = { version = "2.6.3", optional = true }
4744
reflink-copy = { version = "0.1.24", optional = true }
45+
n0-error = "0.1.0"
46+
nested_enum_utils = "0.2.3"
4847

4948
[dev-dependencies]
5049
clap = { version = "4.5.31", features = ["derive"] }
@@ -69,3 +68,9 @@ hide-proto-docs = []
6968
metrics = []
7069
default = ["hide-proto-docs", "fs-store"]
7170
fs-store = ["dep:redb", "dep:reflink-copy"]
71+
72+
[patch.crates-io]
73+
iroh = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
74+
iroh-base = { git = "https://github.com/n0-computer/iroh.git", branch = "main" }
75+
irpc = { git = "https://github.com/n0-computer/irpc.git", branch = "matheus23/irpc-n0-error" }
76+
n0-error = { git = "https://github.com/n0-computer/n0-error.git", branch = "Frando/arc-stack" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use iroh::{protocol::Router, Endpoint};
3737
use iroh_blobs::{store::mem::MemStore, BlobsProtocol, ticket::BlobTicket};
3838
3939
#[tokio::main]
40-
async fn main() -> anyhow::Result<()> {
40+
async fn main() -> n0_error::Result<()> {
4141
// create an iroh endpoint that includes the standard discovery mechanisms
4242
// we've built at number0
4343
let endpoint = Endpoint::bind().await?;

examples/common/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#![allow(dead_code)]
2-
use anyhow::Result;
32
use iroh::SecretKey;
3+
use n0_error::{Result, StackResultExt};
44
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
55

66
/// Gets a secret key from the IROH_SECRET environment variable or generates a new random one.
77
/// If the environment variable is set, it must be a valid string representation of a secret key.
88
pub fn get_or_generate_secret_key() -> Result<SecretKey> {
99
use std::{env, str::FromStr};
1010

11-
use anyhow::Context;
1211
if let Ok(secret) = env::var("IROH_SECRET") {
1312
// Parse the secret key from string
1413
SecretKey::from_str(&secret).context("Invalid secret key format")

examples/compression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
mod common;
66
use std::{fmt::Debug, path::PathBuf};
77

8-
use anyhow::Result;
8+
use n0_error::Result;
99
use clap::Parser;
1010
use common::setup_logging;
1111
use iroh::protocol::ProtocolHandler;

examples/custom-protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use std::{
4040
sync::{Arc, Mutex},
4141
};
4242

43-
use anyhow::Result;
43+
use n0_error::Result;
4444
use clap::Parser;
4545
use iroh::{
4646
discovery::pkarr::PkarrResolver,

0 commit comments

Comments
 (0)