Project

binaryen

0.0
The project is in a healthy, maintained state
Vendors binaryen libraries, headers, and executables for use in Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

binaryen-rb

Gem Version | CI

A small gem which vendors binaryen releases for easy use from Ruby. It includes the following executables:

Here's a version of the table with the descriptions shortened to a single sentence:

exe description
wasm-split Splits a module into a primary and a secondary module, or instruments a module to gather a profile for future splitting.
wasm-ctor-eval Executes code at compile time.
wasm-merge Merges multiple wasm files into one.
wasm-reduce Reduces a wasm file to a smaller one with the same behavior on a given command.
wasm-metadce Performs dead code elimination (DCE) on a larger space that the wasm module is just a part of.
wasm-shell Executes .wast files.
wasm-fuzz-types Fuzzes type construction, canonicalization, and operations.
wasm-fuzz-lattices Fuzzes lattices for reflexivity, transitivity, and anti-symmetry, and transfer functions for monotonicity.
wasm-emscripten-finalize Performs Emscripten-specific transforms on .wasm files.
wasm-as Assembles a .wat (WebAssembly text format) into a .wasm (WebAssembly binary format).
wasm-opt Reads, writes, and optimizes files.
wasm-dis Un-assembles a .wasm (WebAssembly binary format) into a .wat (WebAssembly text format).
wasm2js Transforms .wasm/.wat files to asm.js.

Please note that these are simplified descriptions and may not fully capture the functionality of each command. For a complete understanding, refer to the original descriptions or the respective command's documentation. It also include libinaryen and it's corresponding header files, if you need them.

Installation

Add the following to your Gemfile:

gem "binaryen"

Then run bundle install.

Usage

This library only contains vendored executables, and minimal Ruby code to invoke them. You can see some examples of how to use this gem in the ./examples directory.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/binaryen-rb. Signing Shopify's CLA is a mandatory when opening, you will be prompted to do so by a Github action.

Read and follow the guidelines in CONTRIBUTING.md.

Releases

This gem is published to Rubygems.

The procedure to publish a new release version is as follows: