diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 549c731..9dd2f04 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 7d57c72..018dd30 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/Cargo.lock b/Cargo.lock index b6fec4c..2ab349b 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 f18b069..cc83efd 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" diff --git a/flake.lock b/flake.lock index 1a29c7b..0a31fc6 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 06555bf..7177f54 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 538355b..cf3ea32 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