Depends on bytecodealliance/wasmtime#12973.
I'm going to have a colleague take a first pass at this. Leaving notes here for context.
The C API now has async component model functions. The easy ones follow existing patterns: config properties, add_wasip2_async(), add_wasi_http_async(). The interesting part is bridging wasmtime_call_future_poll with asyncio for func_call_async, instantiate_async, and add_func_async.
wasmtime_call_future_poll and wasmtime_call_future_delete are already in _bindings.py.
Implementation requires a build containing the additions in bytecodealliance/wasmtime#12973. That won't happen for a couple of weeks afaik. In the meantime, my fork points to a working release https://github.com/chaynabors/wasmtime-py.
Depends on bytecodealliance/wasmtime#12973.
I'm going to have a colleague take a first pass at this. Leaving notes here for context.
The C API now has async component model functions. The easy ones follow existing patterns: config properties,
add_wasip2_async(),add_wasi_http_async(). The interesting part is bridgingwasmtime_call_future_pollwith asyncio forfunc_call_async,instantiate_async, andadd_func_async.wasmtime_call_future_pollandwasmtime_call_future_deleteare already in_bindings.py.Implementation requires a build containing the additions in bytecodealliance/wasmtime#12973. That won't happen for a couple of weeks afaik. In the meantime, my fork points to a working release https://github.com/chaynabors/wasmtime-py.