-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce async support #96
Conversation
Once merged, we will have to tag new release of 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? 🙏 |
cfg_if::cfg_if! { | ||
if #[cfg(feature = "wasi")] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we can try
No, makes sense
@pkedy can you please take a look at the PR? 🙏 |
Add `doc` target to the main Makefile. This provides a way to test how the docs are going to be rendered on docs.rs Signed-off-by: Flavio Castelli <[email protected]>
Allow waPC host to be used inside of an asynchronous runtime New structs and traits have been added: - New struct `WapcHostAsync`, this is the equivalent of `WapcHost` but for async environments. - New trait `WebAssemblyEngineProviderAsync`, this is the equivalent of `WebAssemblyEngineProvider` but for async environments. - New trait `ModuleHostAsync`, this is the equivalent of `ModuleHost` but for async environments. An async runtime has an `async` host callback function. The new type alias `HostCallbackAsync` is used to define this function. The signature of this function is slightly different from the one of the `sync` 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: - The `sync` code has been moved to dedicated files to separate it from the `async` code. - The documentation now states which feature flags might be required to use a struct, type, trait, or method. Fixes wapc#92 Signed-off-by: Flavio Castelli <[email protected]>
Allow usage of wasmtime-provider inside of an asynchronous runtime. New structs and traits have been added: - New struct `WasmtimeEngineProviderAsync`, this is the equivalent of `WasmtimeEngineProvider` but for async environments. - New struct `WasmtimeEngineProviderAsyncPre`, this is the equivalent of `WasmtimeEngineProviderPre` but for async environments. - The `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: - The `sync` code has been moved to dedicated files to separate it from the `async` code. - The documentation now states which feature flags might be required to use a struct, type, trait, or method. - New and improved tests - Reorganized the examples, new ones have been introduced for the async counterparts - Improved `make test` target to cover all the different combination of feature flags - Fix compilation errors caused by different flag combinations Fixes wapc#92 Signed-off-by: Flavio Castelli <[email protected]>
This is required to simplify the development process Signed-off-by: Flavio Castelli <[email protected]>
I've rebased the PR against the latest changed that landed into the |
This is a major release that adds support for `async` providers Signed-off-by: Flavio Castelli <[email protected]>
This is the first release of the wasmtime-provider that provides an async provider for wapc. Signed-off-by: Flavio Castelli <[email protected]>
Consume latest version of wapc Signed-off-by: Flavio Castelli <[email protected]>
Consume latest version of wapc Signed-off-by: Flavio Castelli <[email protected]>
wasmtime-provider 2.0.0 and wapc 2.0.0 are now available on crates.io 🥳 |
This is a massive change required to fix #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 the
sync
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