wasm driver: rust-src on the build host drifts wasm-lock.json — remap the sysroot src #128

Closed
opened 2026-08-26 14:21:08 +02:00 by thecrealm · 0 comments
Owner

Found on a linux/x86_64 dev host (first non-CI host of the lock's host class): ./gradlew build failed verifyWasmDriverLock with a byte-different (still correct) binary despite the pinned toolchain (1.97.1, byte-identical rustc) and the pinned wasm-bindgen 0.2.127 release binary. Cause: with the rust-src component installed (rust-analyzer installs it), rustc resolves std sources to the local sysroot path instead of the precompiled std's /rustc/ virtual path; std panic locations then embed the longer local path (+624 bytes). Fix: cargoBuildWasm appends --remap-path-prefix=/lib/rustlib/src/rust=/rustc/ at execution time — inert where rust-src is absent (CI reproduces the same locked hash, verified in a debian container). D61's per-host-class reproducibility assumption holds again. D61 addendum in the same change-set.

Found on a linux/x86_64 dev host (first non-CI host of the lock's host class): `./gradlew build` failed verifyWasmDriverLock with a byte-different (still correct) binary despite the pinned toolchain (1.97.1, byte-identical rustc) and the pinned wasm-bindgen 0.2.127 release binary. Cause: with the rust-src component installed (rust-analyzer installs it), rustc resolves std sources to the local sysroot path instead of the precompiled std's /rustc/<commit> virtual path; std panic locations then embed the longer local path (+624 bytes). Fix: cargoBuildWasm appends --remap-path-prefix=<sysroot>/lib/rustlib/src/rust=/rustc/<commit> at execution time — inert where rust-src is absent (CI reproduces the same locked hash, verified in a debian container). D61's per-host-class reproducibility assumption holds again. D61 addendum in the same change-set.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thecrealm/katrix#128
No description provided.