Skip to content

Instantly share code, notes, and snippets.

@gonzaloruizdevilla
Created September 5, 2019 21:37
Show Gist options
  • Save gonzaloruizdevilla/cea59df83e90f8a8486d45ea45680302 to your computer and use it in GitHub Desktop.
Save gonzaloruizdevilla/cea59df83e90f8a8486d45ea45680302 to your computer and use it in GitHub Desktop.
async function run() {
const {instance} = await WebAssembly.instantiateStreaming(
fetch("./add.wasm"),
env: { abort: () => console.log("Abort!") }
);
const r = instance.exports.add(1, 2);
console.log(r);
}
run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment