-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(gate)!: wasmtime support #669
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #669 +/- ##
==========================================
- Coverage 73.94% 73.85% -0.10%
==========================================
Files 114 114
Lines 12950 13003 +53
Branches 1358 1358
==========================================
+ Hits 9576 9603 +27
- Misses 3352 3377 +25
- Partials 22 23 +1 ☔ View full report in Codecov by Sentry. |
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.
Can you add an example in the migration description?
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.
lgtm, waiting on another review with that large PR :)
929c5d3
to
3c43717
Compare
#### Motivation and context Enable support for [wit](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) and facilitate readiness for the upcoming specs. #### Migration notes `#[wasmedge_bindgen]` are replaced by wit bindings. In the old version we were restricted to`#[wasmedge_bindgen]`, which was only available in Rust and unique to WasmEdge. ```rust #[wasmedge_bindgen] fn add(a: u32, b: u32) -> u32 { a + b } ``` In the new implementation, wasm modules written in any language that uses the `wit` interface are now natively supported within `typegate`. ```wit // wit/example.wit package example:host; world host { export add: func(a: u32, b: u32) -> u32; } ``` An implementation (eg. in Rust) may look like this.. ```rust // src/lib.rs wit_bindgen::generate!({ world: "host" }); struct MyLib; impl Guest for MyLib { fn add(a: u32, b: u32) -> u32 { a + b } } export!(MyLib); ``` ### Checklist - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change --------- Co-authored-by: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com>
- Finalizes the host side of the `wit_wire` implementation started in #687 . - Fixes a few issues with the `mdk_rust` generator. #### Motivation and context The code generator was already in place but we the typegate had no support for the `wit_wire` interface used by the rust mdk. This PR adds that. The two week delay is mainly due to the base work required in #669 and related PRs. #### Migration notes _No breaking changes on user._ ### Checklist - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change
fix: cherry-pick feat(wasm): wit component support test(wasm): error propagation refactor(wasm): all remaining wasmedge -> wasm fix(wasm): bad conversion feat(wasm): nested object output test(wasm): tuple deserialize test(wasm): update binding test value feat(wasm): nested wit input support feat(wasm): handle enum input, fix object bug feat(wasm): reject on extra fields fix(wasm): typos and minor cleanups fix(tests.yml): disable cache deno dir for now fix: version lock fix: lockfile refactor: rename all wasmedge ref. to wasm refactor(gate): wasi 0.2 pyrt refactor: rename to `pyrt_wit_wire` fix: pre-commit issue wip: try ci fix feat: add pyrt bin inline refactor: `python_wasi` -> `python` wip: import module support fix: rebase bugs feat(metagen): `mdk_rs` finalization (#673) - Finalizes the host side of the `wit_wire` implementation started in - Fixes a few issues with the `mdk_rust` generator. The code generator was already in place but we the typegate had no support for the `wit_wire` interface used by the rust mdk. This PR adds that. The two week delay is mainly due to the base work required in #669 and related PRs. _No breaking changes on user._ - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change feat: Enable batch prisma queries in the typegate runtime (#682) Enable batch prisma queries (and transaction) in the typegate runtime Console [MET-381](https://linear.app/metatypedev/issue/MET-381/console-collections) <!-- Explain HOW users should update their code when required --> - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change --------- Co-authored-by: Teo Stocco <teo@zifeo.com> Co-authored-by: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> fix: update poetry lockfile fix: CI issues fix: minor bugs fix: ci breakage wip: try fix
fix: cherry-pick feat(wasm): wit component support test(wasm): error propagation refactor(wasm): all remaining wasmedge -> wasm fix(wasm): bad conversion feat(wasm): nested object output test(wasm): tuple deserialize test(wasm): update binding test value feat(wasm): nested wit input support feat(wasm): handle enum input, fix object bug feat(wasm): reject on extra fields fix(wasm): typos and minor cleanups fix(tests.yml): disable cache deno dir for now fix: version lock fix: lockfile refactor: rename all wasmedge ref. to wasm refactor(gate): wasi 0.2 pyrt refactor: rename to `pyrt_wit_wire` fix: pre-commit issue wip: try ci fix feat: add pyrt bin inline refactor: `python_wasi` -> `python` wip: import module support fix: rebase bugs feat(metagen): `mdk_rs` finalization (#673) - Finalizes the host side of the `wit_wire` implementation started in - Fixes a few issues with the `mdk_rust` generator. The code generator was already in place but we the typegate had no support for the `wit_wire` interface used by the rust mdk. This PR adds that. The two week delay is mainly due to the base work required in #669 and related PRs. _No breaking changes on user._ - [x] The change come with new or modified tests - [x] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change feat: Enable batch prisma queries in the typegate runtime (#682) Enable batch prisma queries (and transaction) in the typegate runtime Console [MET-381](https://linear.app/metatypedev/issue/MET-381/console-collections) <!-- Explain HOW users should update their code when required --> - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change --------- Co-authored-by: Teo Stocco <teo@zifeo.com> Co-authored-by: Yohe-Am <56622350+Yohe-Am@users.noreply.github.com> fix: update poetry lockfile fix: CI issues fix: minor bugs fix: ci breakage wip: try fix
Motivation and context
Enable support for wit and facilitate readiness for the upcoming specs.
Migration notes
#[wasmedge_bindgen]
are replaced by wit bindings.In the old version we were restricted to
#[wasmedge_bindgen]
, which was only available in Rust and unique to WasmEdge.In the new implementation, wasm modules written in any language that uses the
wit
interface are now natively supported withintypegate
.An implementation (eg. in Rust) may look like this..
Checklist