It is not possible to pass ArrayBuffers or ArrayBufferViews from
JavaScript to WebAssembly. WebAssembly operates only on a single
linear heap that is bound as its own memory space, so it's only
possible to pass pointers (indices) to that one memory buffer. So
currently you would have Wasm operate on its own memory, and then
going out to JS, copy the data from the singleton Wasm memory out to
other JavaScript ArrayBuffers.
There have been talks about expanding Wasm to be able to operate on
multiple ArrayBuffers at a time, by expanding the opcode list to allow
specifying one of multiple ArrayBuffers which to manipulate, but
currently that kind of feature does not yet exist.
>>
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.