0.0.13 • Published 1 year ago

wazum v0.0.13

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
1 year ago

wazum

Wazum is a human-friendly compiler infrastructure library for WebAssembly.

It's an alternative to Binaryen.js with the following benefits:

✍️ Wazum is hand-written and not machine-generated.

🧪 Thoroughly tested and predictable.

🪶 Lightweight and tree-shakeable.

🤯 Large degree of flexibility and hackability of the AST.

🍀 Full type-safety. And I mean full. Type correctness is preferred over type inference.

✨ Stellar documentation, QoL features, overall great DX. Give it a try!

note: the above is the end goal, Wazum is still a work in progress.

// Try Me!
import { w } from 'wazum';
const m = new w.Module();

const add = w.func(
  'add',
  {
    params: [['i32', 'a'], ['i32', 'b']],
    returnType: 'i32',
    locals: []
  },
  w.add('i32', w.local.get('i32', 'a'), w.local.get('i32', 'b'))
);

m.addFunc(add);
console.log(m.compile());

Getting Started

yarn add wazum
// or
npm i wazum

You'll find all the methods and types under:

import { w } from 'wazum';
w. // let IntelliSense guide you!
0.0.12

1 year ago

0.0.13

1 year ago

0.0.1

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.0

2 years ago