Stream: general

Topic: ✔ How to enable wasi shared memory in guest written in Rust?


view this post on Zulip anb (Feb 23 2023 at 19:04):

Hi, I'm playing with the new wasi-threads implementation, which requires shared memory to work with. I haven't found a way to make rustc to generate a wasm32-wasi target to have module import an external memory. I wonder if I missed anything. Could anyone help? Thanks.

view this post on Zulip bjorn3 (Feb 23 2023 at 20:30):

There is an open MCP (major change proposal) to add a new target for wasi-threads: https://github.com/rust-lang/compiler-team/issues/594

Proposal In 2019 the first version of the WASI spec was released (what we now call "WASI Preview 1"), and support was added to rustc as the tier-2 wasm32-wasi target. The folks working on...

view this post on Zulip Joel Dice (Feb 23 2023 at 20:33):

bjorn3 said:

There is an open MCP (major change proposal) to add a new target for wasi-threads: https://github.com/rust-lang/compiler-team/issues/594

That particular proposal is about WASI Preview 2, not wasi-threads (which is unfortunately incompatible with Preview 2 and the Component Model for the time being).

view this post on Zulip Andrew Brown (Feb 23 2023 at 20:40):

Here's the MCP for wasm32-wasi-threads: https://github.com/rust-lang/compiler-team/issues/574.

Proposal Several of us working on WebAssembly (cc: @alexcrichton, @loganek, @sunfishcode, @sbc100, @AlexEne) have made progress on a WASI proposal to allow spawning threads in WebAssembly programs ...

view this post on Zulip Andrew Brown (Feb 23 2023 at 20:41):

It might take me a bit to get around to implementing that so if anyone else wants to help, let me know!

view this post on Zulip anb (Feb 23 2023 at 20:57):

Thanks for the direction, I'll await on the MCP.

view this post on Zulip Notification Bot (Feb 23 2023 at 20:58):

anb has marked this topic as resolved.


Last updated: Dec 23 2024 at 12:05 UTC