Zig 0.17 increases one my wasm lib size from 71k to 81k (about the same as 0.14), whereas 0.15 and 0.16 each shrinked it about 5k.
So far not bad. I’m just curious the reasons. I guess it is a balance between percentages of code generation and (non-generated) runtime code in the std lib.
Ah, it seems the 81k is the debug size (built with zig build wasm), with the -Doptimize=ReleaseSmall option, the size is 68k.
It is strange. in build.zig, I have set the .optimize of the wasm module as .small. I don’t understand why -Doptimize=ReleaseSmall is still needed on the zig build command line.
Do the dependency modules inherit the .optimize option of the wasmLibModule module? Do I need to create small-optimize versions for the dependency modules, to avoid using the -Doptimize=ReleaseSmall option in the zig build wasm command?