checks.wasm builds the same with or without rust-src: its standard-library paths map to /rustc/COMMIT, as the build image has them (refs #96) e4260689c506
- Author
- Andy McCall @andymccall <[email protected]>
- via
- agent
agent:claude@andymccall <[email protected]> · keyless, under your grant for changes,refs,seal · key 1aa36e268d4b
- When
- · 2026-10-27 18:12 UTC
- Signature
- ◈ sealed by agent:claude@andymccall
- Hash
e4260689c506997f6053f60469ba66d62a52a0518a04be2628b3aa41f7344633- Depends on
- 5544c8998aa7
- Depended on by
- 0aac9efcbeea
- In bookmarks
- main
- In tags
- v0.5.1 v0.5.2 v0.5.3
- Edits
- 4 atoms, 0 tree operations, 2 files
Browse the tree at this change
replaced .flow/checks.wasm +0 −0
No line changes.
modified scripts/checks-wasm.sh +7 −2
| … | 7 unchanged lines |
||
| 8 | 8 | # |
|
| 9 | 9 | # The build is the same on any machine with the same toolchain (the build |
|
| 10 | 10 | # image's, images/rust): the crate is std only, the workspace path is |
|
| 11 | - | # remapped to /src, and the module carries no debug info. |
|
| 11 | + | # remapped to /src and rust-src's to /rustc/COMMIT, and the module carries |
|
| 12 | + | # no debug info. |
|
| 12 | 13 | # Needs: rustup target wasm32-wasip1. |
|
| 13 | 14 | set -eu |
|
| 14 | 15 | cd "$(dirname "$0")/.." |
|
| 15 | 16 | target=$(mktemp -d) |
|
| 16 | 17 | trap 'rm -rf "$target"' EXIT |
|
| 17 | - | RUSTFLAGS="--remap-path-prefix=$(pwd)=/src" \ |
|
| 18 | + | # Where rust-src is installed, the standard library's panic locations name |
|
| 19 | + | # it; map it to /rustc/COMMIT, as a toolchain without rust-src has them. |
|
| 20 | + | src="$(rustc --print sysroot)/lib/rustlib/src/rust" |
|
| 21 | + | commit=$(rustc -vV | sed -n 's/^commit-hash: //p') |
|
| 22 | + | RUSTFLAGS="--remap-path-prefix=$(pwd)=/src --remap-path-prefix=$src=/rustc/$commit" \ |
|
| 18 | 23 | CARGO_PROFILE_RELEASE_DEBUG=0 CARGO_PROFILE_RELEASE_STRIP=true CARGO_INCREMENTAL=0 \ |
|
| 19 | 24 | cargo build -q --release --locked --target wasm32-wasip1 -p flow-checks --target-dir "$target" |
|
| 20 | 25 | built="$target/wasm32-wasip1/release/flow-checks.wasm" |
|
| … | 11 unchanged lines |