Web build: no debug symbols, a size profile, and a budget in CI #257

Merged
littlefox merged 5 commits from issue-231-wasm-size into main 2026-10-22 01:20:24 +00:00
Owner

Closes #231

  • dx build keeps DWARF debug info in the wasm by default; every web release build (image, e2e, serve-web) now passes --debug-symbols false.
  • A wasm-release profile for the web only: opt-level "z", fat LTO, one codegen unit, panic = abort. The desktop and the relay keep release.
  • tools/wasm-size.sh (in CI after e2e): fails past 900 KB gzipped.
web build raw gzipped
main 4.49 MB 1.22 MB
no debug symbols 2.77 MB 1.03 MB
+ wasm-release, opt "s" 2.51 MB 924 KB
+ wasm-release, opt "z" (this PR) 2.06 MB 783 KB

Speed, tools/perf.sh, "s" vs "z" back to back: step times, frames, search (25 ms both) and long tasks the same within noise; so "z".

Verified: full e2e suite on three profiles with the "z" build, 330 passed; lint.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #231 - `dx build` keeps DWARF debug info in the wasm by default; every web release build (image, e2e, serve-web) now passes `--debug-symbols false`. - A `wasm-release` profile for the web only: opt-level "z", fat LTO, one codegen unit, panic = abort. The desktop and the relay keep `release`. - `tools/wasm-size.sh` (in CI after e2e): fails past 900 KB gzipped. | web build | raw | gzipped | |---|---|---| | main | 4.49 MB | 1.22 MB | | no debug symbols | 2.77 MB | 1.03 MB | | + wasm-release, opt "s" | 2.51 MB | 924 KB | | + wasm-release, opt "z" (this PR) | 2.06 MB | 783 KB | Speed, `tools/perf.sh`, "s" vs "z" back to back: step times, frames, search (25 ms both) and long tasks the same within noise; so "z". Verified: full e2e suite on three profiles with the "z" build, 330 passed; lint. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
The wasm was 4.5 MB (1.2 MB gzipped), and about 1.3 MB of it was DWARF
debug info: dx build keeps debug symbols unless told not to. The web
build now passes --debug-symbols false and uses a wasm-release profile
(opt-level z, fat LTO, one codegen unit, panic abort): 2.1 MB, 782 KB
gzipped. tools/wasm-size.sh fails CI past 900 KB gzipped, so the next
doubling is noticed when it happens. The desktop and the relay keep the
release profile.

Closes #231

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
An unchanged build isn't written again, so the newest file can be an
older build's. Also notes the web build in DESIGN.md.

Refs #231

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge remote-tracking branch 'origin/main' into issue-231-wasm-size
Some checks failed
ci / desktop (push) Has started running
packaging / debian (pull_request) Has started running
packaging / fedora (pull_request) Has started running
packaging / nix (pull_request) Has started running
ci / check (push) Failing after 16m0s
packaging / arch (pull_request) Successful in 16m2s
ci / e2e (push) Has been cancelled
packaging / release (pull_request) Has been cancelled
3a52c35ec1
Re-run CI: the TLS handshake timed out on an overloaded runner
All checks were successful
ci / desktop (push) Successful in 23m34s
packaging / debian (pull_request) Successful in 26m16s
packaging / release (pull_request) Has been skipped
packaging / nix (pull_request) Successful in 26m24s
ci / check (push) Successful in 15m39s
packaging / arch (pull_request) Successful in 18m26s
ci / e2e (push) Successful in 33m9s
packaging / fedora (pull_request) Successful in 32m10s
6dd7ae3cfb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-22 14:11:05 +00:00
Sign in to join this conversation.
No description provided.