Overview of Binaryen Tools
mainBinaryen provides a suite of command-line tools for working with WebAssembly. These tools are deterministic, meaning the same input will always produce the same output.
Key tools include:
wasm-opt: Loads WebAssembly and runs Binaryen IR passes on it.wasm-as: Assembles WebAssembly text format (S-Expression) into binary format.wasm-dis: Un-assembles WebAssembly binary format into text format.wasm2js: A WebAssembly-to-JS compiler.wasm-reduce: A testcase reducer to find smaller Wasm files that exhibit specific properties (e.g., crashes).wasm-shell: A shell to load and interpret WebAssembly code and run the spec test suite.wasm-emscripten-finalize: Performs Emscripten-specific passes on Wasm binaries produced by llvm+lld.wasm-ctor-eval: Executes functions or parts of functions at compile time.wasm-merge: A bundler for Wasm that merges multiple files by connecting imports to exports.wasm-metadce: Removes parts of Wasm files based on module usage.binaryen.js: A standalone JavaScript library for creating and optimizing Wasm modules.