Stream: git-wasmtime

Topic: wasmtime / issue #11218 Change `Func::call_concurrent` si...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 11 2025 at 14:34):

dicej opened issue #11218:

Per https://github.com/bytecodealliance/wasmtime/pull/11127#discussion_r2190330180, Alex would like to see the signature of Func::call_concurrent changed to accept .., params: &[Val], results: &mut [Val] parameters and return an impl Future<Output = Result<()>> rather than the .., params: Vec<Val> and impl Future<Output = Result<Vec<Val>>> in the current signature.

I tried implementing this, but it proved difficult to use e.g. in the scenario where the embedder starts concurrent calls in a loop, adds them to a FuturesUnordered and then collects the results. Specifically, it was difficult to create Futures which closed over the results without closing over the store as well. I may have been missing something, though, so we should revisit this.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 11 2025 at 14:34):

dicej added the wasm-proposal:component-model-async label to Issue #11218.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 14 2025 at 17:17):

alexcrichton assigned alexcrichton to issue #11218.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 17 2025 at 19:54):

alexcrichton closed issue #11218:

Per https://github.com/bytecodealliance/wasmtime/pull/11127#discussion_r2190330180, Alex would like to see the signature of Func::call_concurrent changed to accept .., params: &[Val], results: &mut [Val] parameters and return an impl Future<Output = Result<()>> rather than the .., params: Vec<Val> and impl Future<Output = Result<Vec<Val>>> in the current signature.

I tried implementing this, but it proved difficult to use e.g. in the scenario where the embedder starts concurrent calls in a loop, adds them to a FuturesUnordered and then collects the results. Specifically, it was difficult to create Futures which closed over the results without closing over the store as well. I may have been missing something, though, so we should revisit this.


Last updated: Dec 06 2025 at 06:05 UTC