0.9.0 • Published 9 years ago

wast-codegen v0.9.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

NPM version Travis appVeyor

WebAssembly code generator

Generates S-expression WebAssembly from (AST)

Use

Node.js

npm i wast-codegen --save
var codegen = require('wast-codegen');

Functions

.generate()

var src = codegen.generate({
  kind: 'binop',
  type: 'i32',
  operator: 'add',
  left: {
    kind: 'get_local',
    id: {
      kind: 'identifier',
      id: 'x'
    }
  },
  right: {
    kind: 'get_local',
    id: {
      kind: 'identifier',
      id: 'y'
    }
  }
});

produces string (i32.add (get_local $x) (get_local $y)

Testing

npm test

License

MIT LICENSE.

0.9.0

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.1

9 years ago

0.6.0

9 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago