How to use the binaryen.readBinary function in binaryen

To help you get started, we’ve selected a few binaryen examples, based on popular ways it is used in public projects.

github kripken / binaryen-webpack-plugin / index.js View on Github external
function optimize(originalBuffer) {
  var module = Binaryen.readBinary(originalBuffer);
  module.optimize();
  var optimizedBuffer = module.emitBinary();
  return Buffer.from(optimizedBuffer);
}

binaryen

Browser & Node.js builds of Binaryen, a compiler infrastructure and toolchain library for WebAssembly.

Apache-2.0
Latest version published 25 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages