wasm-opt
Optimize WebAssembly binary files. tldr-pages
On several platforms
Several platforms
Apply default optimizations and write to a given file
wasm-opt -O input.wasm --output output.wasmIdentifyApply all optimizations and write to a given file (takes more time, but generates optimal code)
wasm-opt -O4 input.wasm --output output.wasmIdentifyOptimize a file for size
wasm-opt -Oz input.wasm --output output.wasmIdentifyPrint the textual representation of the binary to console
wasm-opt input.wasm --printIdentify