bytecodealliance / bytecodealliance/wasmtime
C API support status for Async Component Model (WASI 0.3)
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
Hello.
I'm evaluating Wasmtime as an embedding runtime from Java through the public Wasmtime C API.
I noticed that Async Component Model support (`component-model-async`) appears to be available in the Rust API, including APIs such as:
* `Func::call_concurrent`
* `Func::start_call_concurrent`
* `Func::finish_call_concurrent`
* `Store::run_concurrent`
* `func_wrap_concurrent`
* native handling of component-model `future` and `stream`
At the same time, I cannot find equivalent functionality in the public C API.
From the documentation it looks like the C API currently exposes the older async mechanism based on:
* `wasmtime_config_async_support_set`
* `wasmtime_func_call_async`
* `wasmtime_call_future_t`
which solves host-side asynchronous execution, but does not appear to expose the Async Component Model scheduler or guest task APIs.
Questions:
1. Is exposing Async Component Model functionality in the C API part of the current roadmap?
2. Is there already an issue tracking support for:
* `call_concurrent`
* `run_concurrent`
* concurrent guest Tasks
* component-model `future` / `stream`
* `func_wrap_concurrent`
3. Is the current recommendation for non-Rust embedders to:
* use Rust as an adapter layer and expose custom FFI,
* or wait for first-class C API support?
4. Are there known architectural blockers preventing a direct mapping of the Async Component Model APIs into the C API?
The motivation is support for WASI 0.3 style component composition from Java without introducing an intermediate Rust host layer.
Thanks.
Contributor guide
Research direction
Start by comparing the Rust async component APIs named in the issue with the public C API functions `wasmtime_config_async_support_set`, `wasmtime_func_call_async`, and `wasmtime_call_future_t`. The issue is done when the project confirms whether C API support for concurrent calls, guest tasks, futures, streams, and `func_wrap_concurrent` is planned, blocked, or requires an adapter layer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, java, rust, wasm
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100