chore(ci): drop the debug name section from the shipped wasm module

wasm-bindgen --remove-name-section: 279 KB raw of function names no code
reads, 30.7 KB gzip; the 600 000-byte budget and its test are unchanged.
This commit is contained in:
bchanot committed 2026-10-29 16:24:18 +01:00
1 parent bb5efa0f00
commit 661212a852
1 file changed
+3 -1
+3 -1
View File
@@ -28,7 +28,9 @@ build_module() {
local out="$1"
shift
cargo build -p faunosteo-wasm --release --target wasm32-unknown-unknown --locked "$@"
wasm-bindgen --target web --out-dir "$out" --out-name faunosteo_wasm \
# The `name` section only names functions for debuggers (279 KB raw, 30.7 KB gzip at
# V1-2.2); no code reads it, and `strip` leaves it in a wasm32 build.
wasm-bindgen --target web --remove-name-section --out-dir "$out" --out-name faunosteo_wasm \
target/wasm32-unknown-unknown/release/faunosteo_wasm.wasm
}