alexcrichton opened PR #13628 from alexcrichton:shrink-sections to bytecodealliance:main:
This PR is me scratching an itch I've had for quite some time, notably that the
.wasmtime.{traps,addrmap}sections are generally huge and pretty inefficiently encoded. These are inserted into all*.cwasmoutputs by default and can often represent over half the size of a compiled module, which I find pretty wasteful. I was curious to throw the problem at an LLM and see if it had recommendations on alternative encoding schemes, and I feel that the result here is pretty understandable and low-complexity while shrinking both of these sections by ~75% over their encodings today. The end result is a 30% size reduction of alibpython.cwasmfrom 25M to 17M which is a relatively huge improvement. The new encodings are drop-in replacements for the previous API of encoding/searching, and they share general structure but not so much internals to enable the two to still diverge over time if necessary.
alexcrichton requested pchickey for a review on PR #13628.
alexcrichton requested wasmtime-core-reviewers for a review on PR #13628.
:thumbs_up: pchickey submitted PR review.
alexcrichton added PR #13628 Shrink cwasm .wasmtime.{traps,addrmap} sections to the merge queue.
:check: alexcrichton merged PR #13628.
alexcrichton removed PR #13628 Shrink cwasm .wasmtime.{traps,addrmap} sections from the merge queue.
Last updated: Jul 29 2026 at 05:03 UTC