Skip to content

Instantly share code, notes, and snippets.

Created Mar 19, 2019
What would you like to do?
const {wastInstructions} = require('inline-wast/lib/interpreter');
function add(a, b) {
const fn = wastInstructions`
(i32.const ${a})
(i32.const ${b})
return fn();
console.log(add(3, 1)); // 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment