Skip to content

Commit e2cfde7

Browse files
feat!: update to edition 2024 and update deps to latest (#3386)
## Description Updates dependencies where possible. Closes #3385 Depends on - [x] n0-computer/net-tools#30 ## Breaking Changes All crates are now `edition2024`
1 parent f8f7f95 commit e2cfde7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+917
-881
lines changed

Cargo.lock

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

iroh-base/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "iroh-base"
33
version = "0.90.0"
4-
edition = "2021"
4+
edition = "2024"
55
readme = "README.md"
66
description = "base type and utilities for Iroh"
77
license = "MIT OR Apache-2.0"
@@ -18,7 +18,7 @@ workspace = true
1818
curve25519-dalek = { version = "4.1.3", features = ["serde", "rand_core", "zeroize"], optional = true }
1919
data-encoding = { version = "2.3.3", optional = true }
2020
ed25519-dalek = { version = "2.1.1", features = ["serde", "rand_core", "zeroize"], optional = true }
21-
derive_more = { version = "1.0.0", features = ["display"], optional = true }
21+
derive_more = { version = "2.0.1", features = ["display"], optional = true }
2222
url = { version = "2.5.3", features = ["serde"], optional = true }
2323
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"], optional = true }
2424
rand_core = { version = "0.6.4", optional = true }

iroh-dns-server/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "iroh-dns-server"
33
version = "0.90.0"
4-
edition = "2021"
4+
edition = "2024"
55
description = "A pkarr relay and DNS server"
66
license = "MIT OR Apache-2.0"
77
authors = ["Frando <[email protected]>", "n0 team"]
@@ -16,7 +16,7 @@ axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] }
1616
base64-url = "3.0"
1717
bytes = "1.7"
1818
clap = { version = "4.5.1", features = ["derive"] }
19-
derive_more = { version = "1.0.0", features = [
19+
derive_more = { version = "2.0.1", features = [
2020
"debug",
2121
"display",
2222
"into",
@@ -50,7 +50,7 @@ tokio-rustls = { version = "0.26", default-features = false, features = [
5050
tokio-rustls-acme = { version = "0.7.1", features = ["axum"] }
5151
tokio-stream = "0.1.14"
5252
tokio-util = "0.7"
53-
toml = "0.8.10"
53+
toml = "0.9.2"
5454
tower-http = { version = "0.6.1", features = ["cors", "trace"] }
5555
tower_governor = "0.7"
5656
tracing = "0.1"

iroh-dns-server/benches/write.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::sync::Arc;
22

3-
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
4-
use iroh::{discovery::pkarr::PkarrRelayClient, node_info::NodeInfo, SecretKey};
5-
use iroh_dns_server::{config::Config, metrics::Metrics, server::Server, ZoneStore};
3+
use criterion::{BenchmarkId, Criterion, Throughput, criterion_group, criterion_main};
4+
use iroh::{SecretKey, discovery::pkarr::PkarrRelayClient, node_info::NodeInfo};
5+
use iroh_dns_server::{ZoneStore, config::Config, metrics::Metrics, server::Server};
66
use n0_snafu::Result;
77
use rand_chacha::rand_core::SeedableRng;
88
use tokio::runtime::Runtime;

iroh-dns-server/examples/publish.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ use std::{net::SocketAddr, str::FromStr};
22

33
use clap::{Parser, ValueEnum};
44
use iroh::{
5+
NodeId, SecretKey,
56
discovery::{
6-
dns::{N0_DNS_NODE_ORIGIN_PROD, N0_DNS_NODE_ORIGIN_STAGING},
7-
pkarr::{PkarrRelayClient, N0_DNS_PKARR_RELAY_PROD, N0_DNS_PKARR_RELAY_STAGING},
87
UserData,
8+
dns::{N0_DNS_NODE_ORIGIN_PROD, N0_DNS_NODE_ORIGIN_STAGING},
9+
pkarr::{N0_DNS_PKARR_RELAY_PROD, N0_DNS_PKARR_RELAY_STAGING, PkarrRelayClient},
910
},
10-
node_info::{NodeIdExt, NodeInfo, IROH_TXT_NAME},
11-
NodeId, SecretKey,
11+
node_info::{IROH_TXT_NAME, NodeIdExt, NodeInfo},
1212
};
1313
use n0_snafu::{Result, ResultExt};
1414
use url::Url;

iroh-dns-server/examples/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use clap::{Parser, ValueEnum};
22
use iroh::{
3+
NodeId,
34
discovery::dns::{N0_DNS_NODE_ORIGIN_PROD, N0_DNS_NODE_ORIGIN_STAGING},
45
dns::DnsResolver,
5-
NodeId,
66
};
77
use n0_snafu::{Result, ResultExt};
88

iroh-dns-server/src/dns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ use hickory_server::{
1616
self,
1717
op::ResponseCode,
1818
rr::{
19-
rdata::{self},
2019
LowerName, Name, RData, Record, RecordSet, RecordType, RrKey,
20+
rdata::{self},
2121
},
2222
serialize::{binary::BinEncoder, txt::RDataParser},
2323
xfer::Protocol,
2424
},
2525
server::{Request, RequestHandler, ResponseHandler, ResponseInfo},
2626
store::in_memory::InMemoryAuthority,
2727
};
28-
use n0_snafu::{format_err, Result, ResultExt};
28+
use n0_snafu::{Result, ResultExt, format_err};
2929
use serde::{Deserialize, Serialize};
3030
use tokio::{
3131
net::{TcpListener, UdpSocket},

iroh-dns-server/src/dns/node_authority.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use tracing::{debug, trace};
1919

2020
use crate::{
2121
store::ZoneStore,
22-
util::{record_set_append_origin, PublicKeyBytes},
22+
util::{PublicKeyBytes, record_set_append_origin},
2323
};
2424

2525
#[derive(derive_more::Debug)]

iroh-dns-server/src/http.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ use std::{
66
};
77

88
use axum::{
9+
Router,
910
extract::{ConnectInfo, Request, State},
1011
handler::Handler,
1112
http::Method,
1213
middleware::{self, Next},
1314
response::IntoResponse,
1415
routing::get,
15-
Router,
1616
};
1717
use n0_snafu::{Result, ResultExt};
1818
use serde::{Deserialize, Serialize};
@@ -22,7 +22,7 @@ use tower_http::{
2222
cors::{self, CorsLayer},
2323
trace::TraceLayer,
2424
};
25-
use tracing::{info, span, warn, Level};
25+
use tracing::{Level, info, span, warn};
2626

2727
mod doh;
2828
mod error;

iroh-dns-server/src/http/doh.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
// https://github.com/fission-codes/fission-server/blob/main/fission-server/src/routes/doh.rs
55

66
use axum::{
7+
Json,
78
extract::State,
89
response::{IntoResponse, Response},
9-
Json,
1010
};
1111
use hickory_server::proto::{
1212
serialize::binary::BinDecodable,
1313
{self},
1414
};
1515
use http::{
16-
header::{CACHE_CONTROL, CONTENT_TYPE},
1716
HeaderValue, StatusCode,
17+
header::{CACHE_CONTROL, CONTENT_TYPE},
1818
};
1919
use n0_snafu::ResultExt;
2020

0 commit comments

Comments
 (0)