feat(plugin-wasm): migrate plugin system to WASI 0.3 / component-model async#588
Open
staging-devin-ai-integration[bot] wants to merge 6 commits into
Open
feat(plugin-wasm): migrate plugin system to WASI 0.3 / component-model async#588staging-devin-ai-integration[bot] wants to merge 6 commits into
staging-devin-ai-integration[bot] wants to merge 6 commits into
Conversation
…sync Bumps wasmtime to 45 with the experimental WASIp3 host, vendors the wasi@0.3.0-rc-2026-03-15 WITs that wasmtime 45 links against, and makes process/update-params/send-output native async funcs driven through store.run_concurrent. Signed-off-by: streamkit-devin <devin@streamkit.dev>
Regenerates the SDK with wit-bindgen 0.58 (async guest support), makes the example's process/update-params async, and builds it as a component via plain cargo + wasm32-wasip2 (no cargo-component). The host links both wasi p2 and p3 since Rust's wasip2 std still imports wasi@0.2. Signed-off-by: streamkit-devin <devin@streamkit.dev>
Signed-off-by: streamkit-devin <devin@streamkit.dev>
Regenerates the C bindings with wit-bindgen 0.58 and rewrites the example's process/update-params for the component-model-async callback ABI, parking the send-output subtask in a waitable set when the host doesn't complete synchronously. Verified end-to-end (Rust + C) by an ignored smoke test that drives prebuilt example components through the new host. Signed-off-by: streamkit-devin <devin@streamkit.dev>
Signed-off-by: streamkit-devin <devin@streamkit.dev>
Signed-off-by: streamkit-devin <devin@streamkit.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (38.70%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #588 +/- ##
==========================================
- Coverage 82.43% 82.27% -0.17%
==========================================
Files 240 240
Lines 71297 71416 +119
Branches 2249 2249
==========================================
- Hits 58773 58755 -18
- Misses 12520 12657 +137
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
process,update-params, and thesend-outputhost import are nowasync funcinwit/plugin.wit@0.2.0.component_model_async: guest calls run insidestore.run_concurrent, and async imports are implemented via the generatedHostWithStoretrait. This unblocks future concurrent/cancellable guest calls andstream<T>pins.wasi:cli@0.3.0-rc-2026-03-15snapshot wasmtime 45's p3 host links against (final 0.3.0 WITs aren't in wasmtime yet). The linker registers both p2 and p3 WASI because Rust'swasm32-wasip2std still importswasi@0.2interfaces.wit_bindgen::rt, replacing the deadwit-bindgen-rtcrate); guests build with plaincargo build --target wasm32-wasip2—cargo-componentandwkgare no longer needed.send-outputdoesn't complete synchronously). Go is left behind for now:wit-bindgen-gocannot parse async WIT yet, so the Go example/bindings stay on the old world with a README notice and thejustrecipe disabled.Review & Validation
cargo test -p streamkit-plugin-wasm --test gain_plugin_smoke -- --ignoredpasses after building the Rust (just build-plugin-wasm-rust) and C (just build-plugin-wasm-c, needs wasi-sdk) examples — drives a real component through the full async host path (construct → process → routed output → shutdown).crates/plugin-wasm/src/lib.rsand therun_concurrentloop inwrapper.rsfor cancellation/shutdown behavior.samples/pipelines/oneshot/gain_filter_rust.ymlstill exercises the plugin end-to-end viatests/pipeline-validation.Notes
wit-bindgen-gogains component-model async support; considerstream<packet>-shaped pins as a next step.Link to Devin session: https://staging.itsdev.in/sessions/8a4721b3ccbb4a4d9ea85422ade86fdf
Requested by: @streamer45
Devin Review
9a6cd73