mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-25 23:10:34 -04:00
12 lines
235 B
JavaScript
12 lines
235 B
JavaScript
async function run() {
|
|
let res = await fetch('./add.wasm');
|
|
res = await res.arrayBuffer();
|
|
res = await WebAssembly.instantiate(res, {
|
|
env: {},
|
|
});
|
|
const { add } = res.instance.exports;
|
|
console.log(add(3, 5));
|
|
}
|
|
|
|
run();
|