3 ms·
Depends what you mean by "integrate". It always has to import or export JS functions or memory. WASM (without WASI) has no direct connection to "the outside Wor
by ReleaseCandidat 3y ago
Depends what you mean by "integrate". It always has to import or export JS functions or memory. WASM (without WASI) has no direct connection to "the outside World", everything has to be routed via JS FFI. So you can import or export a SharedArrayBuffer to communicate with JS.
https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Memory#creating_a_shared_memory https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScr...
But you need the WASM thread extension (for atomic access to the shared memory) to be able to use shared memory.