From 661212a85203ea97b888daa6a6bc4e6a43ca9614 Mon Sep 17 00:00:00 2001 From: bchanot Date: Thu, 29 Oct 2026 16:24:18 +0100 Subject: [PATCH] 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. --- scripts/wasm-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/wasm-build.sh b/scripts/wasm-build.sh index a0049719..210fa4a5 100755 --- a/scripts/wasm-build.sh +++ b/scripts/wasm-build.sh @@ -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 }