mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-20 12:10:52 +00:00
We currently pass a raw view into wasm's memory for `getStringFromWasm`, but if the memory is actually shared then `TextDecoder` rejects `SharedArrayBuffer` and won't actually decode anything. Work around this for now with an extra copy into a local buffer, and then pass that buffer to `getStringFromWasm` whenever memory is shared.