Update witx to 0.9#59
Merged
Merged
Conversation
This pulls in the new `witx` 0.9 crate which notably includes WebAssembly/WASI#395. This is a large refactoring of how witx signatures are processed and a large update to the actual syntax of the witx ABIs themselves. This commit adjusts to all the new `witx` APIs and also tweaks idioms in a few locations as well. Code generation is now less custom to Rust and instead tries to match almost exactly what the `witx` crate tells us to generate. Additionally the representation of types is chosen to more closely align with interface types in the future where it's impossible to pass invalid values to the outside world. Notable changes here are: * `enum`-like values are now newtype wrappers around integers to prevent invalid values from flowing out. * Error traits are now implement directly for the `Errno` wrapper. * The module containing the raw functions now exclusively uses i32/i64 types and doesn't try to use convenience types in Rust.
512a7d9 to
5daf0f9
Compare
Member
Author
|
It should be worth pointing out, however, that WebAssembly/WASI#395 should block this and this should wait probably until that's published on crates.io. |
Member
Author
|
Ok should be good for review now! |
pchickey
approved these changes
Feb 19, 2021
Contributor
|
The |
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.
This pulls in the new
witx0.9 crate which notably includesWebAssembly/WASI#395. This is a large refactoring of how witx signatures
are processed and a large update to the actual syntax of the witx ABIs
themselves.
This commit adjusts to all the new
witxAPIs and also tweaks idioms ina few locations as well. Code generation is now less custom to Rust and
instead tries to match almost exactly what the
witxcrate tells us togenerate. Additionally the representation of types is chosen to more
closely align with interface types in the future where it's impossible
to pass invalid values to the outside world. Notable changes here are:
enum-like values are now newtype wrappers around integers to preventinvalid values from flowing out.
Errnowrapper.types and doesn't try to use convenience types in Rust.