Open
Description
Hi! Thanks for this. I'm looking at the wasi-js example, and wondering where can get the value of wasmOpts
here?
import { WASI } from "wasi-js";
import fs from "fs";
import nodeBindings from "wasi-js/dist/bindings/node";
const wasi = new WASI({
args: [],
env: {},
bindings: {...nodeBindings, fs},
});
const source = await readFile(pathToWasm);
const typedArray = new Uint8Array(source);
const result = await WebAssembly.instantiate(typedArray, wasmOpts); // where can we wasmOpts
wasi.start(result.instance);
I tried looking at the WASI implementation of node 20 and tried to do it as well - but it is undefined:
const result = await WebAssembly.instantiate(typedArray, wasi.getImportObject()); // getImportObject is undefined
Any tips? Thank you!
Metadata
Metadata
Assignees
Labels
No labels