I have C code which returns a void* and size_t length to Javascript running in a web worker. In Javascript i have the following
let start = getStartAddress();
let len = getLength();
I know for Strings i can do
let mystring = UTF8ToString(start);
This is documented https://emscripten.org/docs/api_reference/preamble.js.html#conversion-functions-strings-pointers-and-arrays
I am at a total loss as to how i get an Uint8Array that i can send through postMessage.
Where would i find documentation that tells me how to do that?
In the absence of documentation an answer to my question would suffice.