Stream: wasmtime

Topic: Example on how to use `Func::call_concurrent`?


view this post on Zulip Lorenzo (Jan 08 2026 at 01:06):

Hi everyone. I've updated wasmtime from v27 to v40 aiming to call component functions concurrently (as part of the same Store instance, with dynamically linked components). e.g. say I have WASI CLI A and WASI CLI B and want to run both components concurrently that share the same store and can also communicate between each other.

I'm trying to implement Func::call_concurrent -- does anyone know if there are any examples for this? I'm not sure if it's possible to do what I'm thinking, perhaps I'd need multiple Stores and to manage the data replication from the host?

view this post on Zulip Alex Crichton (Jan 08 2026 at 15:21):

Most examples at this time will be throughout Wasmtime's test suite, we don't have dedicated examples for this just yet.

You'll be able to use one store and you'll be using run_concurrent to get an Accessor which from there you can call call_concurrent

view this post on Zulip Lorenzo (Jan 08 2026 at 23:28):

I see. That sounds good, thanks!


Last updated: Jan 09 2026 at 13:15 UTC