Closed zwcloud closed 5 years ago
Possible solution 1
Use emscripten memory as an ArrayBufferView
and access it from C# via mono/wasm.
Directly access emscripten memory as an ArrayBufferView
is currently not directly impossible because it is blocked by kripken/emscripten#6747.
A possible workaround is to re-get the ArrayBufferView
from Module.HEAPF32.buffer
:
if (Module.HEAPF32.buffer !== b) { b = Module.HEAPF32.buffer; view = ...; }
See the gitter archive on 2018/11/06 for details.
Possible solution 2
Create, write and read an ArrayBufferView
from C# via mono/wasm.
See https://github.com/sq/FNA/blob/c3803c30fb3e96137d2a8f56e5128072bdb4281b/src/Platform/JSIL.cs#L60 Also, by kg
iirc they already have implementations of EA in spidermonkey and v8 that just aren't always enabled due to bugs.
Investigate emscripten.