That's right, my understanding was that this was in a multithreaded
Web Worker context since SharedArrayBuffer was mentioned.
To share memory between JavaScript and Wasm in the same thread,
SharedArrayBuffer is not needed. You can malloc() a block of memory in
the WebAssembly heap either on C side or JS side, and pass the pointer
to the other side and access the memory directly.
Unfortunately it is not possible to pass a whole separate
ArrayBuffer(View) from outside JavaScript to inside a WebAssembly
Module, but the WebAssembly Module is limited to operating only on the
one buffer that it is initialized with.
>> > email to
emscripten-disc...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
emscripten-disc...@googlegroups.com.