-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(wasi): add support for wasi:[email protected]
#10061
base: main
Are you sure you want to change the base?
Conversation
850a038
to
ea8cd4c
Compare
6366fd2
to
38c0f34
Compare
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.
Thanks for getting this started!
I think that, until 0.3 is released, we should keep the existing bindings to 0.2.x at their current position in the module tree, because they have "real" users whereas 0.3 should not yet. We also don't want to bake the patch version into the module paths of the public API, since it changes regularly and upgrades are supposed to be transparent to users.
I'd support a PR that moves the canonical definition of the 0.2 bindings to bindings::p2
with a pub use
at their current location that we can eventually (as 0.3 release approaches) mark as deprecated. When introducing new bindings, lets put those at bindings::p3
and behind an off-by-default cargo feature p3
. The module and cargo feature should have a comment indicating these implementations are unstable and pre-standardization, and that bug/security fixes limited to p3 won't be given patch releases.
Signed-off-by: Roman Volosatovs <[email protected]>
I've moved the existing WASI implementations to I'll meanwhile mark this PR as draft, rebase it on top of #10073 and introduce the |
Signed-off-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
Signed-off-by: Roman Volosatovs <[email protected]>
630e330
to
14298eb
Compare
Signed-off-by: Roman Volosatovs <[email protected]>
14298eb
to
3ba676b
Compare
Blocked on #10073
This adds support for
wasi:[email protected]
from https://github.com/WebAssembly/wasi-random/tree/3e99124e81d0f80872b826d161bef077ee37d241/wit-0.3.0-draftThe change is fully backwards-compatible from the guest's perspective.
The only breaking change is the
wasmtime_wasi::bindings
structure, wherewasmtime_wasi::bindings::random
is now located atwasmtime_wasi::bindings::random0_2_3
.The interface versions are almost identical apart from the
@since
gates.This PR is intentionally small and well-scoped to establish the approach and enable further (mostly) backwards-compatible development and testing for WASI 0.3
For now, the existing
command
world is simply extended withwasi:[email protected]
. In the future we'll probably want to decouple the component export and import binding generation and instead generate:wasi:cli/[email protected]
andwasi:cli/[email protected]
(https://github.com/WebAssembly/wasi-cli/blob/1311434b3440621a5b5fda55378587d971f0c783/wit-0.3.0-draft/imports.wit), but does not export anythingwasi:cli/[email protected]
wasi:cli/[email protected]
This way we will be able to accommodate 2 different versions of
wasi:cli/command
exported by components