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?
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
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.
Yeah, it's a Wasmtime-specific thing... hopefully improved in the future
Wrote up a quick howto “WASI Threads with Wasmtime”: https://surma.dev/postits/wasi-threads/
I really liked this, @Surma
re-tooted, or whatever
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.
I hope i didn't steal any thunder!!! I'd love to take a look, but i have no clue how to get access.
No worries!
Last updated: Nov 22 2024 at 16:03 UTC