Skip to content

Repository files navigation

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:

exedescription
wasm-splitSplits a module into a primary and a secondary module, or instruments a module to gather a profile for future splitting.
wasm-ctor-evalExecutes code at compile time.
wasm-mergeMerges multiple wasm files into one.
wasm-reduceReduces a wasm file to a smaller one with the same behavior on a given command.
wasm-metadcePerforms dead code elimination (DCE) on a larger space that the wasm module is just a part of.
wasm-shellExecutes .wast files.
wasm-fuzz-typesFuzzes type construction, canonicalization, and operations.
wasm-fuzz-latticesFuzzes lattices for reflexivity, transitivity, and anti-symmetry, and transfer functions for monotonicity.
wasm-emscripten-finalizePerforms Emscripten-specific transforms on .wasm files.
wasm-asAssembles a .wat (WebAssembly text format) into a .wasm (WebAssembly binary format).
wasm-optReads, writes, and optimizes files.
wasm-disUn-assembles a .wasm (WebAssembly binary format) into a .wat (WebAssembly text format).
wasm2jsTransforms .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:

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

73 watching

Forks

Releases

Packages

Used by

Contributors

Languages