admin管理员组

文章数量:1356864

I have a WIT compatible Web Assembly Component Model based module written in JAVASCRIPT/TYPESCRIPT and exposed as a WASM using jco and further transpiled to run in the browser. I have 2 questions in this scenarios where I am facing issues developing it further and debugging.

  1. The WIT file has a listed import world oewcx { export oewcxchng; import oewcxchngutil;} interface oewcxchngutil{ logmessage: func(cls:string,mthd:string,lvl : string, message:string); } functions that the wasm should be able to invoke on the host-js which is using the wasm in the browser, however i see that the generated transpiled js creates a core.wasm file which is then instantiated using WebAssembly, however it doesnot create any handler/interface to send importable interface implementations from host-js to the wasm . How to achieve this. there is no such/related reference in the language-support reference .html .
  2. The logs/errors from the WASM are not showing up in browser, hence we are unable to debug anything in the browser how to achieve this. for any issue the wasm throws below error .Uncaught (in promise) RuntimeError: unreachable

本文标签: browserImport interfacefuctions through WIT in JS Web Assembly Component Model WASMStack Overflow