How to use the binaryen.js.Module 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 pannous / angle / angle.js / extensions.js View on Github external
function wast(input) {
	Binaryen = require('binaryen.js')
	module = new Binaryen.Module(input)

	const parser = require('wast-parser'); // NON-OFFICIAL TOY!
	let ast = parser.parse(input)

	wasm_buffer = Binaryen.compileWast(wast)
	// module=await WebAssembly.compile(wasm_buffer)
	// instance=await WebAssembly.instantiate(module)
	// instance.exports.addTwo(1,2)


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

Latest version published 25 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages