Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well I just thought of something obvious... Have a function that lets you pass in an ArrayBuffer, then it brings it into the virtual address space of the WASM program. Function would return the virtual address that was assigned to that array buffer. From there, you call into WASM again with that pointer, and the program can take action.

Then there would be another function to relinquish ownership of the ArrayBuffer.



There's no SharedArrayBuffer support? Or I misunderstand the idea


There is, but then you'd need to declare the entire WASM heap as a single SharedArrayBuffer. It only makes sense for shared-memory multithreading (but not that support for SharedArrayBuffer only works in 'cross-origin isolated' contexts).

There is a related 'multiple memories' proposal btw: https://github.com/WebAssembly/multi-memory




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: