Binaryen.js provides prebuilt browser and Node.js binaries of Binaryen, a compiler infrastructure and toolchain library for WebAssembly. Version 129.0.0 is the latest stable release; the project follows Binaryen releases closely. It optimizes Wasm modules, performs transformations (e.g., inlining, dead code elimination), and validates/parses Wasm. Key differentiators: it works entirely in JavaScript with no native dependencies, making it suitable for web build pipelines, and it supports both ESM and CommonJS. Compared to wasm-opt CLI, it enables programmatic Wasm optimization in Node.js or browser bundlers.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Default export in ESM is a namespace object; call Binaryen.ready() before use (Async).
Module is a class on the default export; not a named export.
readBinary is attached to the default export, not imported standalone.
Creates a simple Wasm module with an 'add' function, validates, and emits binary.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.