bytecodealliance / wasmtime

A fast and secure runtime for WebAssembly
https://wasmtime.dev/
Apache License 2.0
14.81k stars 1.24k forks source link

Reduce the size of the wasp1 component adapter by 22k #8859

Closed bjorn3 closed 1 week ago

bjorn3 commented 1 week ago

This reduces the size of wasi_snapshot_preview1.command.wasm from 75029 bytes to 53875 bytes for a total win of 21154 bytes. This is done by deduplicating most of the trap messages and the code for printing those trap messages. Also got some small wins by making the assertion message shorter.

This is a continuation of https://github.com/bytecodealliance/wasmtime/pull/8858.

bjorn3 commented 1 week ago

For future reference: https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/wasi-preview1-component-adapter.20size