You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when building with wasm32-wasi-preview1-threads using rayon, the generated wasm requires spawn_thread and shared memory. I believe shared memory is not yet considered. Are there any plans, discussions, or workarounds to address this?
The text was updated successfully, but these errors were encountered:
bokuweb
changed the title
[Question] Is There a Plan to Support wasm-threads, Specifically Shared Memory?
[Question] Is there a plan to support wasm-threads, specifically shared memory?
Nov 30, 2023
The current plan is to extend threading support in core wasm through the shared-everything-threads proposal. The meat of this proposal is adding shared attributes to everything (not just memory), allowing whole instances to be shared (avoiding the O(n^2) function table usage with previous approaches) as well as a new solution for thread-local storage. There's also possibly a thread.spawn instruction for actually creating a new thread, but it's contentious (since it's a lot more work for browsers) so it's possible instead that we'll need to add thread.spawn as a canonical built-in to the Component Model (which would be importable by core wasm with the shared func type added by the shared-everything-threads proposal).
ref: bytecodealliance/wasm-tools#1306
Currently, when building with
wasm32-wasi-preview1-threads
usingrayon
, the generatedwasm
requiresspawn_thread
andshared memory
. I believe shared memory is not yet considered. Are there any plans, discussions, or workarounds to address this?The text was updated successfully, but these errors were encountered: