feat(worker-build): support split WebAssembly debug info - #1066
logan-gatlin wants to merge 5 commits into
Conversation
- Preserve DWARF through the build pipeline and emit `.debug.wasm` sidecars - Strip runtime debug sections and reference sidecars via `external_debug_info` - Add manifest configuration, template defaults, cleanup, and coverage
Merging this PR will not alter performance
|
|
Currently this will do nothing. Needs a workerd follow up to accept wasm debug sidecar files in addition to JS sourcemaps |
Advance the wasm-bindgen submodule to the Walrus 0.27.2 fix and remove the rolled-back memory.discard experiment so Binaryen 130 can optimize DWARF-enabled template builds.
Validate runtime and sidecar Wasm, make repeated splitting deterministic, canonicalize external_debug_info references, improve tool and file errors, and document the Wrangler/platform integration contract.
|
What is the benefit of splitting the debug information for Workers, over publishing a binary with the debug section included? |
Javascript source maps do not count towards the bundle size limit, and do not impact cold start time. The idea is to put wasm debug info in this separate bucket so it gets the same benefits as js |
Summary
split-debug-infoprofile support toworker-buildand enable it in workers-rs templates.wasm-opt, then emit standards-compliant*.debug.wasmexternal DWARF sidecars..debug_*sections and add one relativeexternal_debug_inforeference encoded as a WebAssembly name.Testing
cargo test -p worker-build(21 tests)cargo clippy -p worker-build --all-targets -- -D warningscargo fmt -p worker-build -- --checkwasm-tools validateon both the runtime and external DWARF sidecarexternal_debug_info, no runtime.debug_*, and DWARF sections in the sidecar