binaryen-rb
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:
- Update
lib/binaryen/version.rbto a validbinaryenrelease version - Run bundle install to bump the version of the gem in
Gemfile.lock - Open a pull request, review, and merge
- Review commits since the last release to identify user-facing changes that should be included in the release notes
- Create a release on GitHub with a version number that matches
lib/binaryen/version.rb. More on creating releases. - Deploy via Shipit and see your latest version on Cloudsmith