wasm-opt

wasm-opt

TLDR

Apply default optimizations and write to a given file

>_ wasm-opt -O [input.wasm] -o [output.wasm]
copy

Apply all optimizations and write to a given file (takes more time, but generates optimal code)

>_ wasm-opt -O4 [input.wasm] -o [output.wasm]
copy

Optimize a file for size

>_ wasm-opt -Oz [input.wasm] -o [output.wasm]
copy

Print the textual representation of the binary to console

>_ wasm-opt [input.wasm] --print
copy

Copied to clipboard
free 100$ digital ocean credit