diff --git a/flake.nix b/flake.nix index 8a8c51cc2d3..f114c9117a9 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,16 @@ overlays = [ (import rust-overlay) ]; }; + wasm-bindgen-version = + (pkgs.lib.findSingle (package: package.name == "wasm-bindgen") + (throw "Cargo.lock has no wasm-bindgen package") + (throw "Cargo.lock has multiple wasm-bindgen versions") + (builtins.fromTOML (builtins.readFile ./Cargo.lock)).package + ).version; + wasm-bindgen-cli = + pkgs.${"wasm-bindgen-cli_${builtins.replaceStrings [ "." ] [ "_" ] wasm-bindgen-version}"} + or (throw "nixpkgs does not package wasm-bindgen-cli ${wasm-bindgen-version} locked in Cargo.lock"); + # Pinned build toolchain (not latest stable) so `nix develop` and CI # compile against a fixed rustc and the relay's MSRV can't creep up # unnoticed. The floor is 1.98, not the 1.95 relay MSRV: earlier rustc @@ -144,8 +154,8 @@ # Source-based test coverage (`just rs coverage`). cargo-llvm-cov # Browser/WASM bindings (rs/moq-wasm -> @moq/wasm via `just js wasm`). - # wasm-bindgen-cli must match the `wasm-bindgen` crate version (the - # crate is pinned to nixpkgs' CLI version); bump both together. + # Cargo.lock selects the matching schema version, independently of + # nixpkgs' default wasm-bindgen-cli. wasm-bindgen-cli ] ++ gstreamerDeps diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 6797954bca9..49a85b01cdc 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -73,7 +73,6 @@ The historical samples locate candidates; they are not controlled benchmarks. ## Required -- [Cargo.lock pins wasm-bindgen](/quest/m0/ci/wasm-bindgen-pin.md) - the dev shell's wasm-bindgen CLI follows `Cargo.lock`, so a nixpkgs bump cannot break WASM on `main` - [One CI pass](/quest/m0/ci/one-pass.md) - the queue's Linux gate is one `just ci` job once Check sheds its permutations - [Require the release gates](/quest/m0/ci/release-gates.md) - release PRs require platform and the optional workflows; main requires only the Linux gate - [CI pipeline audit](/quest/m0/ci/audit.md) - every queue and nightly job earns its minutes, and the Rust cache reuses unchanged crates diff --git a/quest/m0/ci/wasm-bindgen-pin.md b/quest/m0/ci/wasm-bindgen-pin.md deleted file mode 100644 index 04f03fcfc71..00000000000 --- a/quest/m0/ci/wasm-bindgen-pin.md +++ /dev/null @@ -1,30 +0,0 @@ -# [XS] Cargo.lock pins wasm-bindgen - -## Goal - -`Cargo.lock` is the only pin for wasm-bindgen: the Nix dev shell's -`wasm-bindgen-cli` follows the locked `wasm-bindgen` crate version, so a -nixpkgs bump can no longer move the CLI away from the crate. A locked version -nixpkgs does not package fails loudly at Nix eval. - -## Plan - -Why: [#5896](https://github.com/moq-dev/moq/pull/5896) changed only -`flake.lock`, which moved the CLI to 0.2.129 while the crates were still -`=0.2.127`. Dependabot auto-merged it on the required Check and Test while -WASM was red, and [#5911](https://github.com/moq-dev/moq/pull/5911) re-pinned. -Any nixpkgs bump can repeat it. - -- `flake.nix` reads the `wasm-bindgen` version from `Cargo.lock` - (`builtins.fromTOML`) and selects nixpkgs' versioned - `wasm-bindgen-cli_0_2_`. The pinned nixpkgs (8edc0c72) carries - `wasm-bindgen-cli_0_2_93` through `_0_2_129`. -- Update the comments beside `wasm-bindgen-cli` in `flake.nix` and beside the - `wasm-bindgen` pin in `rs/moq-wasm/Cargo.toml`, which today say to bump - both together. - -Decided 2026-10-19 (maintainer): `Cargo.lock` selects the CLI. Rejected: a CI -step comparing the two versions, which detects drift instead of removing it, -and making Dependabot's auto-merge wait for WASM. - -Public API: none. Wire: none. diff --git a/quest/m1/audit-test-cost.md b/quest/m1/audit-test-cost.md index fec36b1f156..07bedab7d87 100644 --- a/quest/m1/audit-test-cost.md +++ b/quest/m1/audit-test-cost.md @@ -54,8 +54,8 @@ What the m0 run (2026-10-19) learned; check these first: [macOS QUIC connects](/quest/m1/test-flakes-2/macos-quic-connect.md), and [nightly media players](/quest/m1/media-engines-nightly.md). Owned elsewhere: release builds by [release builds link](/quest/m0/release-link.md), - Rust advisories by the dependency audit, and the Nix wasm-bindgen pin by - [Cargo.lock pins wasm-bindgen](/quest/m0/ci/wasm-bindgen-pin.md). + and Rust advisories by the dependency audit. The Nix wasm-bindgen CLI now + follows `Cargo.lock` ([#6031](https://github.com/moq-dev/moq/pull/6031)). Baselines from queue run [39371990135](https://github.com/moq-dev/moq/actions/runs/39371990135): diff --git a/rs/moq-wasm/Cargo.toml b/rs/moq-wasm/Cargo.toml index c0ac2be7c08..7e4da3af4e4 100644 --- a/rs/moq-wasm/Cargo.toml +++ b/rs/moq-wasm/Cargo.toml @@ -34,8 +34,8 @@ moq-net = { workspace = true } thiserror = { workspace = true } tracing-wasm = "0.2" url = { workspace = true } -# Pinned to the wasm-bindgen-cli version in the Nix dev shell: the bindgen -# schema must match exactly between crate and CLI. Bump both together. +# The bindgen schema must match exactly between crate and CLI. The Nix dev +# shell selects its CLI from the resolved version in Cargo.lock. wasm-bindgen = "=0.2.129" wasm-bindgen-futures = "0.4" web-async = { workspace = true }