git ssb


0+

wanderer / wast2wasm



Branch:

wanderer committed update descrtiptionLatest: fc408b1 on 1/1/2017, 3:16:55 PM
📄.gitmodules
📄README.md
📄build.js
📄example.js
📄index.js
📄package.json
📁src
📄wabt

SYNOPSIS

Translates from s-expressions to the WebAssembly binary-encoding. It wraps wabt's wast2wasm

INSTALL

npm install wast2wasm

USAGE

const wast2wasm = require('wast2wasm')

const wast = `
(module)
`
wast2wasm(wast, true).then(output => {
  console.log(output.buffer)
  // Uint8Array [ 0, 97, 115, 109, 13, 0, 0, 0 ]
  console.log(output.log)
  // 0000000: 0061 736d                                 ; WASM_BINARY_MAGIC
  // 0000004: 0d00 0000                                 ; WASM_BINARY_VERSION
})

API

Parameters

Returns Promise which resolves an object with the property buffer for for the compiled binary and log for the log

LICENSE

MPL-2.0)


Built with git-ssb-web