From 8e23bc0225778567c17e53cfa59cb7ef307c74b9 Mon Sep 17 00:00:00 2001 From: benjamin Date: Tue, 30 Jun 2026 18:04:23 +0000 Subject: [PATCH] DO NOT MERGE: build against ngrok-rust PR #203 (edition 2024 + dep bumps) Verifies ngrok-python builds/lints clean against the not-yet-merged ngrok-rust PR #203 (https://github.com/ngrok/ngrok-rust/pull/203), which moves the SDK to Rust 2024 edition and bumps security deps. No glue-code changes were required; ngrok-python itself stays on edition 2021. This PR exists only to exercise the CI suite against PR #203. It MUST NOT be merged: it depends on an unmerged branch via a [patch.crates-io] git ref. When PR #203 merges and a new ngrok release ships, drop the [patch] section and bump the `ngrok` version dependency instead. Changes: - Cargo.toml: TEMPORARY [patch.crates-io] ngrok -> git branch bmps/bump-the-security-deps (lock pins the exact rev). - Cargo.toml: bump aws-lc-sys =0.41.0 / aws-lc-rs =1.17.0 to match PR #203 (aws-lc-sys is a `links` crate, so versions must unify). - flake.lock: bump fenix -> 1.98-nightly. The SDK's edition 2024 + let-chains need rustc >= 1.88; the old pinned 1.82 nightly can't build it. - flake.lock: bump nixpkgs -> 2026-06-29. The old cargo-udeps (Cargo 1.79) cannot parse edition-2024 manifests and fails the Udeps job; this applies once the SDK is published too, not just under the patch. - flake.nix: flatten devShell buildInputs (nested lists deprecated in nixpkgs 26.05, surfaced by the bump). Verified locally: cargo check, clippy, rustfmt, udeps pass; maturin develop links + `import ngrok` works. Live integration tests need an authtoken -> validated by CI here. --- Cargo.lock | 79 ++++++++++-------------------------------------------- Cargo.toml | 11 ++++++-- flake.lock | 18 ++++++------- flake.nix | 4 +-- 4 files changed, 33 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba8f2fbc..17eb259b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.13.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -80,9 +80,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" dependencies = [ "bindgen", "cc", @@ -134,16 +134,14 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bindgen" -version = "0.69.5" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.12.1", - "lazy_static", - "lazycell", "log", "prettyplease", "proc-macro2", @@ -152,7 +150,6 @@ dependencies = [ "rustc-hash", "shlex 1.3.0", "syn 2.0.101", - "which", ] [[package]] @@ -558,15 +555,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "hostname" version = "0.3.1" @@ -906,12 +894,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.172" @@ -928,12 +910,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - [[package]] name = "linux-raw-sys" version = "0.9.4" @@ -1024,9 +1000,8 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "muxado" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe5ca6bbdcad071d41711c03946be52da5fb46bb42024e5d0d74e2fcefeab71" +version = "0.5.3" +source = "git+https://github.com/ngrok/ngrok-rust?branch=bmps%2Fbump-the-security-deps#c1e4354c35a220f60d494c286fda8e4b7e74a32c" dependencies = [ "async-trait", "awaitdrop", @@ -1035,7 +1010,7 @@ dependencies = [ "futures", "pin-project", "rand", - "thiserror 1.0.69", + "thiserror 2.0.17", "tokio", "tokio-util", "tracing", @@ -1044,8 +1019,7 @@ dependencies = [ [[package]] name = "ngrok" version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ad94d0fd5a5e1f5bb6a99f06b8babc62594799785451f4aeb048c9b2848ef8" +source = "git+https://github.com/ngrok/ngrok-rust?branch=bmps%2Fbump-the-security-deps#c1e4354c35a220f60d494c286fda8e4b7e74a32c" dependencies = [ "arc-swap", "async-trait", @@ -1533,22 +1507,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" [[package]] name = "rustix" @@ -1559,7 +1520,7 @@ dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.4", + "linux-raw-sys", "windows-sys 0.59.0", ] @@ -1875,7 +1836,7 @@ dependencies = [ "fastrand", "getrandom 0.3.2", "once_cell", - "rustix 1.0.7", + "rustix", "windows-sys 0.59.0", ] @@ -2136,18 +2097,6 @@ dependencies = [ "wit-bindgen-rt", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 52dd3243..ca2bcd7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,13 +27,20 @@ rustls-pemfile = "2.0.0" tokio = { version = "1.40", features = ["sync"] } tracing = { version = "0.1.37", features = ["log", "log-always"] } url = "2.4.0" -aws-lc-sys = { version = "=0.28.0", features = ["bindgen"] } -aws-lc-rs = "=1.13.0" +aws-lc-sys = { version = "=0.41.0", features = ["bindgen"] } +aws-lc-rs = "=1.17.0" [build-dependencies] prost-build = "0.13.5" pyo3-build-config = "0.24" +# TEMPORARY: build against the unmerged ngrok-rust PR #203 (edition 2024 + dep bumps). +# https://github.com/ngrok/ngrok-rust/pull/203 +# Remove this patch (and revert the aws-lc-sys/aws-lc-rs bumps if needed) once +# that lands and a new ngrok release is published, then bump the `ngrok` version. +[patch.crates-io] +ngrok = { git = "https://github.com/ngrok/ngrok-rust", branch = "bmps/bump-the-security-deps" } + [profile.release] lto = true diff --git a/flake.lock b/flake.lock index 8fa076d3..4f7d2a5e 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1721716180, - "narHash": "sha256-9s6WJOHUo/ChtV+1Kysf/BA0SIqmfl9SjJtkpiyRUWg=", + "lastModified": 1782813643, + "narHash": "sha256-+Y7z6oWSTJSKIhxPw7YKHOcIgoX/1PWgpRMZMj4AHlw=", "owner": "nix-community", "repo": "fenix", - "rev": "8df0c074eac46e1f90e9e25c65ddbc2241717bb1", + "rev": "df161b9bd5f8ff444b2c213cd45410b7da6da602", "type": "github" }, "original": { @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721622093, - "narHash": "sha256-iQ+quy3A1EKeFyLyAtjhgSvZHH7r+xybXZkxMhasN4I=", + "lastModified": 1782760764, + "narHash": "sha256-N66fYdUuZ9hpdM7jsQ7CUWtLJduqGDyTGCaLR62CXaQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "453402b94f39f968a7c27df28e060f69e4a50c3b", + "rev": "7a1a64774a5fd0b0cd39ac95d0e170ace8b266a0", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1721661365, - "narHash": "sha256-dHCsQcxaa3luWEXD+ehItZtWU2B10DXb7GWBF1Fy+I4=", + "lastModified": 1782776471, + "narHash": "sha256-/dDPf8xr1qlkNyo7L7E3rAPRoabyF0t5ymVOEf+5bks=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "329adb5ab18bbb6f9f4ff47c6426412fefc50618", + "rev": "c2a5273d39654d67b9ba952d64278ed40d35433d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 158ef8ea..68c2713a 100644 --- a/flake.nix +++ b/flake.nix @@ -125,14 +125,12 @@ LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"; buildInputs = with pkgs; [ toolchain - python-toolchain - llvm-toolchain fix-n-fmt setup-hooks cargo-udeps semver-checks extract-version - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ python-toolchain ++ llvm-toolchain ++ lib.optionals stdenv.isDarwin [ # nix darwin stdenv has broken libiconv: https://github.com/NixOS/nixpkgs/issues/158331 libiconv pkgs.darwin.apple_sdk.frameworks.Security