wasm-opt
Optimize WebAssembly binary files. More information: <https://github.com/webassembly/binaryen>.
Install
- All systems
-
curl cmd.cat/wasm-opt.sh
- Debian
-
apt-get install binaryen
- Ubuntu
-
apt-get install binaryen
- Alpine
-
apk add binaryen
- Kali Linux
-
apt-get install binaryen
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install binaryen
- OS X
-
brew install binaryen
- Dockerfile
- dockerfile.run/wasm-opt
- Docker
-
docker run cmd.cat/wasm-opt wasm-opt
powered by Commando
Optimize WebAssembly binary files. More information: <https://github.com/webassembly/binaryen>.
-
Apply default optimizations and write to a given file:
wasm-opt -O input.wasm -o output.wasm
-
Apply all optimizations and write to a given file (takes more time, but generates optimal code):
wasm-opt -O4 input.wasm -o output.wasm
-
Optimize a file for size:
wasm-opt -Oz input.wasm -o output.wasm
-
Print the textual representation of the binary to console:
wasm-opt input.wasm --print
© tl;dr; authors and contributors