Stream: general

Topic: Optimize a wasm component as wasm-opt does for a module


view this post on Zulip Christoph Brewing (Mar 20 2025 at 06:58):

I have WASM files in two flavors: modules and components. A component, according to my understanding, is a module accompanied by an embedded but explicit interface definition which was provided as WIT (WASM interface types).

Now, I can create both of these flavors but so far I can only optimize modules. For optimization, I take wasm-opt, e.g.

wasm-opt -O3 -o mywasmopt.wasm mywasm.wasm

It works only for modules, not for components. My question is: How do I optimize components the same way I am used to optimize modules?


Last updated: Apr 07 2025 at 12:05 UTC