Stream: wasmtime

Topic: WASI Thread module instantiatoin


view this post on Zulip Surma (Feb 14 2023 at 17:58):

I just compiled wasmtime ToT with the wasi-threads feature to play with the WASI Threads module.

Trying to run a module fails with missing required memory export which is of course contradictory that threaded modules need to ahve a single memory _import_. Am I missing a trick? Or is it just too early?

view this post on Zulip Cheng Shao (Feb 14 2023 at 17:59):

some special flags are needed, see https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general/topic/.E2.9C.94.20Did.20anyone.20manage.20to.20run.20a.20wasm32-wasi-threads.20module.3F/near/326596161

view this post on Zulip Surma (Feb 14 2023 at 18:05):

Ah none of those flags apply to me as I am not using WASI-SDK. I am writing raw WAT. BUT the key insight was to _both_ import _and_ export the memory. That made it work.

view this post on Zulip Andrew Brown (Feb 14 2023 at 18:52):

Yeah, it's a Wasmtime-specific thing... hopefully improved in the future

view this post on Zulip Surma (Feb 15 2023 at 17:16):

Wrote up a quick howto “WASI Threads with Wasmtime”: https://surma.dev/postits/wasi-threads/

WASI is finally providing an universal API to spawn a thread from within WebAssembly.

view this post on Zulip Ralph (Feb 15 2023 at 17:51):

I really liked this, @Surma

view this post on Zulip Ralph (Feb 15 2023 at 17:51):

re-tooted, or whatever

view this post on Zulip Andrew Brown (Feb 15 2023 at 22:53):

Welp... You'll want to take a look at the post I put together that is currently under review here (some BA group permissions needed, I think). Should be out next week and it goes into a bit more detail on the history of all this work.

view this post on Zulip Surma (Feb 16 2023 at 08:39):

I hope i didn't steal any thunder!!! I'd love to take a look, but i have no clue how to get access.

view this post on Zulip Andrew Brown (Feb 16 2023 at 15:51):

No worries!


Last updated: Nov 22 2024 at 16:03 UTC