Closed bokuweb closed 7 months ago
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).
@lukewagner Thanks!!!!
ref: https://github.com/bytecodealliance/wasm-tools/issues/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?