Open GuoLei1990 opened 3 years ago
Is there possible to call compiler in editor and only include necessary binding API to reduce the size of wasm binary.
// Optimize for size.
wasm-opt -Os -o output.wasm input.wasm
// Optimize aggressively for size.
wasm-opt -Oz -o output.wasm input.wasm
// Optimize for speed.
wasm-opt -O -o output.wasm input.wasm
// Optimize aggressively for speed.
wasm-opt -O3 -o output.wasm input.wasm
ref: code-size
Embind will generate JS code to import wasm binary. we can bind the API as we need to reduce wasm binary size. And the size of glue file will not change dramatically.