Closed flavio closed 1 month ago
Once merged, we will have to tag new release of wapc
and wasmtime-provider
. I wonder if we should do a major release instead of a minor one.
Ideas?
Thanks for get awesome description! I agree this probably warrants a new major release. I'm a little busy but I will review this as soon.
@pkedy, did you have chance to look at the PR? :pray:
@pkedy can you please take a look at the PR? :pray:
I've rebased the PR against the latest changed that landed into the master
branch. I'll merge it once everything is green
wasmtime-provider 2.0.0 and wapc 2.0.0 are now available on crates.io 🥳
This is a massive change required to fix https://github.com/wapc/wapc-rs/issues/92
Changes to
wapc
crateAllow waPC host to be used inside of an asynchronous runtime
New structs and traits have been added:
WapcHostAsync
, this is the equivalent ofWapcHost
but for async environments.WebAssemblyEngineProviderAsync
, this is the equivalent ofWebAssemblyEngineProvider
but for async environments.ModuleHostAsync
, this is the equivalent ofModuleHost
but for async environments.An async runtime has an
async
host callback function. The new type aliasHostCallbackAsync
is used to define this function. The signature of this function is slightly different from the one of thesync
counterpart. All the input paremeters are owned types, not pointers. That's required because the function can be sent to different threads by the async runtime; introducing lifetime constraints proved to be impossible.The async support is behind a feature flag named
asyc
. This flag is enabled by default. The implementation relies on the tokio crate.Other notable changes:
sync
code has been moved to dedicated files to separate it from theasync
code.Changes to
wasmtime-provider
crateNew structs and traits have been added:
WasmtimeEngineProviderAsync
, this is the equivalent ofWasmtimeEngineProvider
but for async environments.WasmtimeEngineProviderAsyncPre
, this is the equivalent ofWasmtimeEngineProviderPre
but for async environments.WasmtimeEngineProviderBuilder
has been extened to allow the creation of the new "async" objects describe above.The async support is behind a feature flag named
asyc
. This flag is enabled by default. The implementation relies on the tokio crate.Other notable changes:
sync
code has been moved to dedicated files to separate it from theasync
code.make test
target to cover all the different combination of feature flags