binaryen-rb

Latest version of 'binaryen' @ Cloudsmith Build status

A small gem which vendors binaryen releases for common Ruby platforms.

Owner @Shopify/liquid-perf
Help #liquid-perf

Installation

Add the following to your Gemfile:

gem "binaryen"

Then run bundle install.

Usage

This library only contains vendored binaries, and minimal Ruby code. It is intended to be used by other gems which depend on binaryen.

require "binaryen"

wasm_opt = Binaryen::Command.new("wasm-opt", timeout: 2)
result = wasm_opt.run("-O4", stdin: "(module)")
assert_equal("asm\x01", result.read.strip)

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: