@irongeek/binaryen

0.1.0 • Public • Published

webassembly
Binaryen Installation via NPM

npm npm downloads GitHub issues GitHub release (latest by date) License

This package will download, compile, and install the WebAssembly Binaryen toolchain from https://github.com/WebAssembly/binaryen as NPM global executables

Prerequisites

Installation

npm install -g @irongeek/binaryen

📌 NOTE

Please give it some time to finish... 🙏

Depends on your computer specs, the installation process might take a while, and because NPM suppresses all output from custom install script (unless exception is thrown), the process might seems like it's stuck or hanging while it's actually busy compiling the binaries.

Included Tools

Tools Description
wasm-opt Loads WebAssembly and runs Binaryen IR passes on it
wasm-as Assembles WebAssembly in text format (currently S-Expression format) into binary format (going through Binaryen IR)
wasm-dis Un-assembles WebAssembly in binary format into text format (going through Binaryen IR)
wasm2js A WebAssembly-to-JS compiler. This is used by Emscripten to generate JavaScript as an alternative to WebAssembly
wasm-reduce A testcase reducer for WebAssembly files. Given a wasm file that is interesting for some reason (say, it crashes a specific VM), wasm-reduce can find a smaller wasm file that has the same property, which is often easier to debug. See the docs for more details
wasm-shell A shell that can load and interpret WebAssembly code. It can also run the spec test suite
wasm-emscripten-finalize Takes a wasm binary produced by llvm+lld and performs emscripten-specific passes over it
wasm-ctor-eval A tool that can execute C++ global constructors ahead of time. Used by Emscripten

Known Issues

Must be run under bourne shell (sh) compatible terminal.

May or may not work on Windows using Windows Subsystem for Linux.

Acknowledgement

Mathias Buus for the original webassembly-binary-toolkit installation script.

License

This package is released under the terms of The MIT License

Package Sidebar

Install

npm i @irongeek/binaryen

Weekly Downloads

8

Version

0.1.0

License

MIT

Unpacked Size

5.7 kB

Total Files

4

Last publish

Collaborators

  • irongeek