Optimizer and compiler/toolchain library for WebAssembly
Binaryen is a compiler and toolchain infrastructure library for WebAssembly written in C++. It is designed to make compiling to WebAssembly easy, fast, and effective by providing a simple C API and JavaScript bindings, accepting WebAssembly-like input as well as control flow graphs, and featuring a compact internal representation optimized for parallel codegen and optimization. The project includes an optimizer with numerous passes for improving code size and speed, plus toolchain utilities such as `wasm-opt` for optimization, `wasm-as` and `wasm-dis` for assembly and disassembly, `wasm2js` for compilation to JavaScript, `wasm-shell` for interpretation, and `binaryen.js` for use as a standalone JavaScript library. Binaryen is used as a component by Emscripten, wasm-pack, and other toolchains, and as a library by compilers like AssemblyScript, Asterius, and Grain.