You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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";importfsfrom"fs";importnodeBindingsfrom"wasi-js/dist/bindings/node";constwasi=newWASI({args: [],env: {},bindings: {...nodeBindings, fs},});constsource=awaitreadFile(pathToWasm);consttypedArray=newUint8Array(source);constresult=awaitWebAssembly.instantiate(typedArray,wasmOpts);// where can we wasmOptswasi.start(result.instance);
I tried looking at the WASI implementation of node 20 and tried to do it as well - but it is undefined:
constresult=awaitWebAssembly.instantiate(typedArray,wasi.getImportObject());// getImportObject is undefined
Any tips? Thank you!
The text was updated successfully, but these errors were encountered:
Hi! Thanks for this. I'm looking at the wasi-js example, and wondering where can get the value of
wasmOpts
here?I tried looking at the WASI implementation of node 20 and tried to do it as well - but it is undefined:
Any tips? Thank you!
The text was updated successfully, but these errors were encountered: