add go wasm js
This commit is contained in:
6
deno_run_wasm/go/run_add.js
Normal file
6
deno_run_wasm/go/run_add.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import * as _ from "./wasm_exec.js";
|
||||
const go = new window.Go();
|
||||
const f = await Deno.open("./add.wasm")
|
||||
const buf = await Deno.readAll(f);
|
||||
const inst = await WebAssembly.instantiate(buf, go.importObject);
|
||||
go.run(inst.instance);
|
||||
Reference in New Issue
Block a user