shortcuts/stats/mod.ts

11 lines
303 B
TypeScript
Raw Normal View History

2024-09-28 16:04:12 +00:00
import "../lib/wasm.js";
const go = new Go();
const code =
await (await fetch(import.meta.url.replace("/mod.ts", "/mod.wasm")))
.arrayBuffer();
const wasmMmodule = await WebAssembly.instantiate(code, go.importObject);
const wasm = wasmMmodule.instance;
go.run(wasm);
export default wasm.exports;