alexcrichton opened issue #11870:
This issue is similar to #11869 but I've separated it out to specifically deal with usage of
block_onwith respect towrap_asyncand its variants. Thewrap_asyncfunction has been a pillar of Wasmtime's async support historically but it's effectively entirely incompatible with component-model-async semantics. Notablywrap_async"locks" a store acrossawaitpoints meaning that it's not possible to progress other tasks at the same time. While this sort of means thatwrap_asyncis "just another blocking call" from the perspective of a component it has the notable consequence of makingrun_concurrentnot actually properly run things concurrently. Effectively this suffers from the same problems as #11869.Fixing this issue is expected to be difficult. Ideally we'd "just delete all calls and use
wrap_concurrentinstead", but that's a pretty large change to make. That also doesn't clearly translate to core wasm where there's no equivalent of concurrent calls at this time. A more localized fix would be to remove all of Wasmtime's usage ofwrap_async, document the pitfalls, and then move on. For examplewasmtime-wasiwould avoid usingwrap_asyncand would usewrap_concurrent(or an equivalent thereof) instead. This wouldn't actually fix WASIp1 APIs since there's no*_concurrentavailable, though.Regardless I wanted to write down this issue to have a place to discuss this and notably link to in the source/documentation about how this is a major limitation of
run_concurrenttoday.
alexcrichton added the wasm-proposal:component-model-async label to Issue #11870.
Last updated: Dec 06 2025 at 06:05 UTC