Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
A proper solution for this problem will also help with the WebGPU API. Mapping a GPU resource returns a JS array view, which currently requires copying to and from the WASM heap (for instance see here in Emscripten's WebGPU shim: https://github.com/emscripten-core/emscripten/blob/37aa752eb...).
Ideally the array view could either be mapped directly into the WASM heap, or at least would be accessible from the C/C++/Rust side with a special pointer type (maybe WASM should get address space segmetation like back in the 286 days lol).
There are stray references to the concept of multiple address spaces (or 'memories') in the wasm spec at present, and I recall at one point you may have always been passing 'memory #0' to your load/store opcodes. It looks like people are still working on that as the solution.
https://github.com/WebAssembly/multi-memory