Big size of wasm file after compile with silver swift to wasm

why wasm file on C compiled with emscripten have size ~ same as original
but Fire compiled module with size 4,6 Mb 0_0

how can I use Module2.wasm if he have on the start a size 4,6mb ?

emscripten:

Fire:



4,6 mb =(
maybe I understand something wrong ?
and please tell me yet what is RTL ? because without RTL - 2,3 Mb, but big too

Hi, that’s mostly debug info and RTL. If you disable debug info it becomes about 500 kb.

Thanks for you answer, tell me please, how can I disable debug info for minimum size of output wasm file ?

in Settings, set Generate Debug Symbols to NO. Or build “Release”, which already has that off.

build “Release” always gives me an error, so it’s better for me to configure the debug mode… ) Thanks =)

I configured debug mode and make small refactor of the example code.

Total:
without RTL and debuf info - 571 Kb from a (swift) file size 313 byte

with small refactor the size has become 551 kb. So it is 20 Kb! less then it was.

And I only changed if let el == nill { … } to guard … else { … }. I will be to test yet, but it seems to me that this is a lot for this small changes.

the 313 size is a bug (already fixed). The ~500 kb is still mostly the RTL and GC code. You can’t really avoid having that as it’s exposed to the Wasm side of things too. That said I’ll look into if we can reduce the size a bit more.