I want to compile for WebAssembly with ASM as fall back. The problem I have 
is the emitted .asm.js file is huge. It's over 20 MB. When I compile just 
straight for ASM the .js file is around 8 MB. Why is that?

To compare the two compiler flags:

Only ASM:

-s TOTAL_MEMORY=134217728 --memory-init-file 1 -s ASSERTIONS=0 -s 
WARN_ON_UNDEFINED_SYMBOLS=1 -s DISABLE_EXCEPTION_CATCHING=0 -s 
NO_EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=\"['stringToUTF8']\" -s 
FORCE_FILESYSTEM=1 -s LEGACY_VM_SUPPORT=1 --bind

WASM with ASM fall back:
-s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s 
DISABLE_EXCEPTION_CATCHING=0 -s NO_EXIT_RUNTIME=1 -s 
EXTRA_EXPORTED_RUNTIME_METHODS=\"['stringToUTF8']\" -s FORCE_FILESYSTEM=1 
-s WASM=1 -s BINARYEN_TRAP_MODE=\'clamp\' -s 
BINARYEN_METHOD=\'native-wasm,asmjs\' --bind


Also is there a way to have memory growth allowed if WASM can be used and 
fixed memory if the fall back is needed? Because as I understand the WASM 
with ASM fall back will in any case allow memory growth which destroys asm?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to