Bump Rust 1.94.0.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2026-03-08 05:40:17 +00:00
parent 55ee0d8ab6
commit d2836e9f50
28 changed files with 39 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ keywords = [
license = "Apache-2.0" license = "Apache-2.0"
readme = "README.md" readme = "README.md"
repository = "https://github.com/matrix-construct/tuwunel" repository = "https://github.com/matrix-construct/tuwunel"
rust-version = "1.91.1" rust-version = "1.94.0"
version = "1.5.1" version = "1.5.1"
[workspace.metadata.crane] [workspace.metadata.crane]

View File

@@ -45,7 +45,7 @@
file = ./rust-toolchain.toml; file = ./rust-toolchain.toml;
# See also `rust-toolchain.toml` # See also `rust-toolchain.toml`
sha256 = "sha256-SDu4snEWjuZU475PERvu+iO50Mi39KVjqCeJeNvpguU="; sha256 = "sha256-qqF33vNuAdU5vua96VKVIwuc43j4EFeEXbjQ6+l4mO4=";
}; };
mkScope = mkScope =

View File

@@ -9,7 +9,7 @@
# If you're having trouble making the relevant changes, bug a maintainer. # If you're having trouble making the relevant changes, bug a maintainer.
[toolchain] [toolchain]
channel = "1.91.1" channel = "1.94.0"
profile = "minimal" profile = "minimal"
components = [ components = [
# For rust-analyzer # For rust-analyzer

View File

@@ -1,4 +1,5 @@
#![expect(clippy::too_many_arguments)] #![expect(clippy::too_many_arguments)]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
pub(crate) mod admin; pub(crate) mod admin;
pub(crate) mod context; pub(crate) mod context;

View File

@@ -1,5 +1,5 @@
#![expect(clippy::toplevel_ref_arg)] #![expect(clippy::toplevel_ref_arg)]
#![expect(clippy::duration_suboptimal_units)] // remove after MSRV 1.91 #![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
pub mod client; pub mod client;
pub mod router; pub mod router;

View File

@@ -61,7 +61,7 @@ pub(crate) async fn get_server_keys_route(
} }
fn valid_until_ts() -> MilliSecondsSinceUnixEpoch { fn valid_until_ts() -> MilliSecondsSinceUnixEpoch {
let dur = Duration::from_secs(86400 * 7); let dur = Duration::from_hours(168);
let timepoint = timepoint_from_now(dur).expect("SystemTime should not overflow"); let timepoint = timepoint_from_now(dur).expect("SystemTime should not overflow");
MilliSecondsSinceUnixEpoch::from_system_time(timepoint).expect("UInt should not overflow") MilliSecondsSinceUnixEpoch::from_system_time(timepoint).expect("UInt should not overflow")
} }

View File

@@ -1,4 +1,5 @@
#![type_length_limit = "12288"] #![type_length_limit = "12288"]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
pub mod alloc; pub mod alloc;
pub mod config; pub mod config;

View File

@@ -1,3 +1,5 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use criterion::{Criterion, criterion_group, criterion_main}; use criterion::{Criterion, criterion_group, criterion_main};
criterion_group!(benches, ser_str); criterion_group!(benches, ser_str);

View File

@@ -1,4 +1,5 @@
#![type_length_limit = "65536"] #![type_length_limit = "65536"]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
extern crate rust_rocksdb as rocksdb; extern crate rust_rocksdb as rocksdb;

View File

@@ -1,3 +1,4 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
#![expect(clippy::needless_borrows_for_generic_args)] #![expect(clippy::needless_borrows_for_generic_args)]
use std::fmt::Debug; use std::fmt::Debug;

View File

@@ -1,3 +1,5 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
mod admin; mod admin;
mod cargo; mod cargo;
mod config; mod config;

View File

@@ -1,3 +1,5 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use criterion::{Criterion, criterion_group, criterion_main}; use criterion::{Criterion, criterion_group, criterion_main};
use tracing::Level; use tracing::Level;
use tuwunel::{Args, Server, runtime}; use tuwunel::{Args, Server, runtime};

View File

@@ -1,5 +1,5 @@
#![type_length_limit = "4096"] //TODO: reduce me #![type_length_limit = "4096"] //TODO: reduce me
#![expect(clippy::duration_suboptimal_units)] // remove after MSRV 1.91 #![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
pub mod args; pub mod args;
pub mod logging; pub mod logging;

View File

@@ -1,3 +1,5 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use std::sync::atomic::Ordering; use std::sync::atomic::Ordering;
use tuwunel::{Server, args, restart, runtime}; use tuwunel::{Server, args, restart, runtime};

View File

@@ -27,7 +27,7 @@ const WORKER_THREAD_MIN: usize = 2;
const BLOCKING_THREAD_KEEPALIVE: u64 = 36; const BLOCKING_THREAD_KEEPALIVE: u64 = 36;
const BLOCKING_THREAD_NAME: &str = "tuwunel:spawned"; const BLOCKING_THREAD_NAME: &str = "tuwunel:spawned";
const BLOCKING_THREAD_MAX: usize = 1024; const BLOCKING_THREAD_MAX: usize = 1024;
const RUNTIME_SHUTDOWN_TIMEOUT: Duration = Duration::from_millis(10000); const RUNTIME_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(10);
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))] #[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
const DISABLE_MUZZY_THRESHOLD: usize = 8; const DISABLE_MUZZY_THRESHOLD: usize = 8;

View File

@@ -1,4 +1,5 @@
#![cfg(test)] #![cfg(test)]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use insta::{assert_debug_snapshot, with_settings}; use insta::{assert_debug_snapshot, with_settings};
use tuwunel::{Args, Server, runtime}; use tuwunel::{Args, Server, runtime};

View File

@@ -1,4 +1,5 @@
#![cfg(test)] #![cfg(test)]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use insta::{assert_debug_snapshot, with_settings}; use insta::{assert_debug_snapshot, with_settings};
use tuwunel::{Args, Server, runtime}; use tuwunel::{Args, Server, runtime};

View File

@@ -1,4 +1,5 @@
#![cfg(test)] #![cfg(test)]
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use insta::{assert_debug_snapshot, with_settings}; use insta::{assert_debug_snapshot, with_settings};
use tracing::Level; use tracing::Level;

View File

@@ -181,7 +181,7 @@ fn cors_layer(server: &Server) -> CorsLayer {
}; };
CorsLayer::new() CorsLayer::new()
.max_age(Duration::from_secs(86400)) .max_age(Duration::from_hours(24))
.allow_methods(METHODS) .allow_methods(METHODS)
.allow_headers(headers) .allow_headers(headers)
.allow_origin(allow_origin) .allow_origin(allow_origin)

View File

@@ -1,5 +1,5 @@
#![type_length_limit = "32768"] //TODO: reduce me #![type_length_limit = "32768"] //TODO: reduce me
#![expect(clippy::duration_suboptimal_units)] // remove after MSRV 1.91 #![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
mod handle; mod handle;
mod layers; mod layers;

View File

@@ -1,3 +1,5 @@
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
use std::{ use std::{
borrow::Borrow, borrow::Borrow,
collections::HashMap, collections::HashMap,

View File

@@ -1,7 +1,7 @@
#![recursion_limit = "256"] #![recursion_limit = "256"]
#![type_length_limit = "98304"] #![type_length_limit = "98304"]
#![expect(refining_impl_trait)] #![expect(refining_impl_trait)]
#![expect(clippy::duration_suboptimal_units)] // remove after MSRV 1.91 #![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
mod manager; mod manager;
mod migrations; mod migrations;

View File

@@ -112,8 +112,8 @@ impl Resolver {
fn configure_opts(server: &Arc<Server>, mut opts: ResolverOpts) -> ResolverOpts { fn configure_opts(server: &Arc<Server>, mut opts: ResolverOpts) -> ResolverOpts {
let config = &server.config; let config = &server.config;
opts.negative_max_ttl = Some(Duration::from_secs(60 * 60 * 24 * 30)); opts.negative_max_ttl = Some(Duration::from_hours(720));
opts.positive_max_ttl = Some(Duration::from_secs(60 * 60 * 24 * 7)); opts.positive_max_ttl = Some(Duration::from_hours(168));
opts.timeout = Duration::from_secs(config.dns_timeout); opts.timeout = Duration::from_secs(config.dns_timeout);
opts.attempts = config.dns_attempts as usize; opts.attempts = config.dns_attempts as usize;
opts.try_tcp_on_error = config.dns_tcp_fallback; opts.try_tcp_on_error = config.dns_tcp_fallback;

View File

@@ -66,8 +66,8 @@ where
.stream() .stream()
.ready_filter(|(next_id, _)| { .ready_filter(|(next_id, _)| {
let backed_off = self.is_backed_off(next_id, Range { let backed_off = self.is_backed_off(next_id, Range {
start: Duration::from_secs(5 * 60), start: Duration::from_mins(5),
end: Duration::from_secs(60 * 60 * 24), end: Duration::from_hours(24),
}); });
!backed_off !backed_off
@@ -135,8 +135,8 @@ async fn fetch_auth_chain(
} }
if self.is_backed_off(&next_id, Range { if self.is_backed_off(&next_id, Range {
start: Duration::from_secs(2 * 60), start: Duration::from_mins(2),
end: Duration::from_secs(60 * 60 * 8), end: Duration::from_hours(8),
}) { }) {
debug_warn!("Backed off from {next_id}"); debug_warn!("Backed off from {next_id}");
continue; continue;

View File

@@ -50,8 +50,8 @@ pub(super) async fn handle_prev_pdu(
} }
if self.is_backed_off(prev_id, Range { if self.is_backed_off(prev_id, Range {
start: Duration::from_secs(5 * 60), start: Duration::from_mins(5),
end: Duration::from_secs(60 * 60 * 24), end: Duration::from_hours(24),
}) { }) {
debug!(?prev_id, "Backing off from prev_event"); debug!(?prev_id, "Backing off from prev_event");
return Ok(None); return Ok(None);

View File

@@ -59,7 +59,7 @@ impl crate::Service for Service {
} }
tokio::select! { tokio::select! {
() = tokio::time::sleep(Duration::from_secs(60 * 60)) => {}, () = tokio::time::sleep(Duration::from_hours(1)) => {},
() = self.services.server.until_shutdown() => return Ok(()) () = self.services.server.until_shutdown() => return Ok(())
}; };
} }

View File

@@ -41,7 +41,7 @@ pub type PubKeys = PublicKeySet;
impl crate::Service for Service { impl crate::Service for Service {
fn build(args: &crate::Args<'_>) -> Result<Arc<Self>> { fn build(args: &crate::Args<'_>) -> Result<Arc<Self>> {
let minimum_valid = Duration::from_secs(3600); let minimum_valid = Duration::from_hours(1);
let (keypair, verify_keys) = keypair::init(args.db)?; let (keypair, verify_keys) = keypair::init(args.db)?;
debug_assert!(verify_keys.len() == 1, "only one active verify_key supported"); debug_assert!(verify_keys.len() == 1, "only one active verify_key supported");

View File

@@ -1,3 +1,5 @@
//! Integration tests entrypoint. //! Integration tests entrypoint.
#![allow(unused_features)] // 1.96.0-nightly 2026-03-07 bug
mod resolve; mod resolve;