From 2a6ac2e721195f450389db50feddda6f8b1a6953 Mon Sep 17 00:00:00 2001 From: Wesley Nelson Date: Wed, 11 Nov 2026 14:06:33 -0800 Subject: [PATCH 1/2] build: move the dev shell and Docker CI builds to Rust 1.88 or later ngrok-rust 0.19.0 locks muxado 0.5.4, which uses let chains; they are stable from Rust 1.88. Its dependencies also include crates on edition 2024, which Cargo before 1.85 cannot parse. The dev shell's fenix pin gave rustc 1.87.0-nightly (2025-03-09), which rejects the let chains with E0658. The udeps, fmt and clippy CI jobs load the same shell through direnv. Only the fenix-flake input moves (and its rust-analyzer-src); nixpkgs stays. The new nightly is rustc 1.102.0-nightly (2026-11-10). The CI jobs that build inside the napi-rs nodejs-rust:lts-* images use the stable toolchain baked into the image when it was built, Cargo 1.82.0, which fails on rand 0.10.3 with "feature edition2024 is required". The Docker build step now updates that toolchain with rustup, which each image has, and adds the job's target to it, as the other build jobs do. The new nightly's clippy rejects two things in src/, fixed here: - the dependency_on_unit_never_type_fallback lint no longer exists, so allowing it is an error; the code it covered was fixed by naming the call_async return type. - search_listeners iterated a map's pairs to use only its values. --- .github/workflows/build.yml | 7 ++++++- .github/workflows/ci.yml | 2 -- flake.lock | 12 ++++++------ src/listener.rs | 2 +- src/session.rs | 1 - 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 549c731a..9dd2f04e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,12 @@ jobs: with: image: ${{ inputs.docker }} options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /build' - run: ${{ inputs.build }} + # The images' stable toolchain dates from when they were built (Rust + # 1.82), too old for edition 2024 dependencies; update it first. + run: | + rustup update stable --no-self-update + rustup target add ${{ inputs.target }} + ${{ inputs.build }} - name: Build run: ${{ inputs.build }} if: ${{ !inputs.docker }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d57c720..018dd300 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,6 @@ jobs: docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine build: | apk add musl-dev gcc make cmake clang llvm build-base - rustup target add x86_64-unknown-linux-musl export CARGO_BUILD_TARGET="x86_64-unknown-linux-musl" ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtbeginS.o /usr/lib ln -s /usr/lib/gcc/x86_64-alpine-linux-musl/14.2.0/crtendS.o /usr/lib @@ -130,7 +129,6 @@ jobs: build: | apk add clang18 llvm18 ln -s /usr/lib/llvm-18/lib/libclang.so.1 /usr/lib/libclang.so - rustup target add aarch64-unknown-linux-musl export CC_aarch64_unknown_linux_musl=aarch64-linux-musl-gcc export CXX_aarch64_unknown_linux_musl=aarch64-linux-musl-g++ export AR_aarch64_unknown_linux_musl=aarch64-linux-musl-ar diff --git a/flake.lock b/flake.lock index 1a29c7b5..0a31fc65 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1741588215, - "narHash": "sha256-XTZ051fwGcDPtCUSb7gJv5BsUPYcvjH9mFjVZboMIKQ=", + "lastModified": 1794405206, + "narHash": "sha256-cuOxbz5ZpU5tW/0WCJacryQ29WwX7YriRSCQOPfmhHw=", "owner": "nix-community", "repo": "fenix", - "rev": "49b0989891f48cbfe6fc288ea76c3efa84000ed5", + "rev": "ccd92f7d6a0cce55646fffc6b5804e9b7a9fb411", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1741517882, - "narHash": "sha256-MmYdZyVwKa3YHzqoHdHw9/jZXkDE/5M3M+7363t4Pkc=", + "lastModified": 1794309314, + "narHash": "sha256-dWYcc8jzHP/9Nl+zpSHqQnMXJwkkPgpYR8eE74rULao=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "5e7dd31c80d5821113ed9c9aa1616a73a63b49a1", + "rev": "2a362a41a8eb6e090f1a12d9b712df85af6f0c33", "type": "github" }, "original": { diff --git a/src/listener.rs b/src/listener.rs index 06555bf2..7177f546 100644 --- a/src/listener.rs +++ b/src/listener.rs @@ -460,7 +460,7 @@ pub(crate) async fn search_listeners( url: Option, ) -> Vec { let mut listeners: Vec = vec![]; - for (_, storage) in GLOBAL_LISTENERS.lock().await.iter() { + for storage in GLOBAL_LISTENERS.lock().await.values() { // filter by session_id, if provided if let Some(session_id) = session_id.as_ref() { if session_id.ne(&storage.session.id()) { diff --git a/src/session.rs b/src/session.rs index 538355bf..cf3ea323 100644 --- a/src/session.rs +++ b/src/session.rs @@ -83,7 +83,6 @@ pub(crate) struct SessionBuilder { } #[napi] -#[allow(dependency_on_unit_never_type_fallback)] #[allow(dead_code)] impl SessionBuilder { /// Create a new session builder From 14206ebf1d588254f04ebc94353323631831e309 Mon Sep 17 00:00:00 2001 From: Wesley Nelson Date: Wed, 11 Nov 2026 13:56:51 -0800 Subject: [PATCH 2/2] deps: bump ngrok to 0.19.0 The reconnect fix of AGENT-1371 ships in a later 0.19.x release of ngrok-rust; moving to 0.19.0 first keeps that later bump small. Cargo.lock comes from `cargo update -p ngrok -p muxado` alone: - ngrok 0.18.0 -> 0.19.0: the requested version. - muxado 0.5.0 -> 0.5.4: ngrok's multiplexer, released with 0.19.0. - tokio-retry 0.3.0 -> 0.3.2: ngrok 0.19.0 requires 0.3.2, the first version with RetryIf::start. - rand 0.10.3, rand_core 0.10.1, chacha20 0.10.2, getrandom 0.4.3, cpufeatures 0.3.1 and r-efi 6.0.0 are added: tokio-retry 0.3.2 depends on rand 0.10, and these are its dependencies. src/ needs no change: it builds against 0.19.0 unchanged. muxado 0.5.4 uses let chains, stable since Rust 1.88, so the crate needs Rust 1.88 or later, not the 1.85 that edition 2024 alone needs. --- Cargo.lock | 83 +++++++++++++++++++++++++++++++++++++++++++++--------- Cargo.toml | 2 +- 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6fec4c8..2ab349bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -238,6 +238,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + [[package]] name = "clang-sys" version = "1.8.1" @@ -302,6 +313,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -536,10 +556,22 @@ checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.2.0", "wasi 0.14.2+wasi-0.2.4", ] +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", +] + [[package]] name = "gimli" version = "0.31.1" @@ -1013,9 +1045,9 @@ dependencies = [ [[package]] name = "muxado" -version = "0.5.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe5ca6bbdcad071d41711c03946be52da5fb46bb42024e5d0d74e2fcefeab71" +checksum = "8ac23a4a060b60ba42de5e988886790ba6aeb86e0ae0c879c637f5bbf0b78299" dependencies = [ "async-trait", "awaitdrop", @@ -1023,8 +1055,8 @@ dependencies = [ "bytes", "futures", "pin-project", - "rand", - "thiserror 1.0.69", + "rand 0.8.5", + "thiserror 2.0.17", "tokio", "tokio-util", "tracing", @@ -1090,9 +1122,9 @@ dependencies = [ [[package]] name = "ngrok" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ad94d0fd5a5e1f5bb6a99f06b8babc62594799785451f4aeb048c9b2848ef8" +checksum = "10f6c455d972d973dded17538cb01426ca79eccb9774ae8ab8f1af637f469f3f" dependencies = [ "arc-swap", "async-trait", @@ -1316,6 +1348,12 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.8.5" @@ -1324,7 +1362,18 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", ] [[package]] @@ -1334,7 +1383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -1346,6 +1395,12 @@ dependencies = [ "getrandom 0.2.16", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "redox_syscall" version = "0.5.11" @@ -1635,7 +1690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -1849,12 +1904,12 @@ dependencies = [ [[package]] name = "tokio-retry" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +checksum = "4a129d95275ebf4c493ec53bf0f8cd95f5ac161bc4f381700809a54f595d4470" dependencies = [ - "pin-project", - "rand", + "pin-project-lite", + "rand 0.10.3", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index f18b069c..cc83efdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ mio = { version = "=0.8.6" } # Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix napi = { version = "2.12.1", default-features = false, features = ["napi4", "tokio_rt"] } napi-derive = "2.12.1" -ngrok = {version = "0.18.0", features = ["hyper", "axum"]} +ngrok = {version = "0.19.0", features = ["hyper", "axum"]} parking_lot = "0.12.1" regex = "1.9.5" rustls = "0.23.25"