Skip to content

Conversation

@alexcrichton
Copy link
Member

This PR, with @kulakowski-wasm, brings the wit-bindgen AST up-to-date with the component model. Namely the changes implemented here are:

This PR was mostly test-driven where the core changes were made to the AST and ABI code and everything else fell out from basically getting cargo test --workspace working.

This is additionally one of the first steps I hope to make towards #314 since if Wasmtime is to consume components the generator and Wasmtime need to agree on encodings which requires wasm-encoder and such to be updated in wit-component which requires these AST changes.

kulakowski-wasm and others added 4 commits September 21, 2022 07:26
This PR updates wit-bindgen for the latest changes to the component model:

- the return of multireturn
- removal of the `unit` type
- a new syntax for optional types in results, streams, futures and variants

all of which go hand in hand.

This also pulls in the latest versions of wasm-encoder, wasmprinter,
and wasmparser crates to get their updates for these component model changes.
Exercise this throughout the runtime tests and additionally add a few
variants in codegen tests to ensure that this is exercised.
@peterhuene peterhuene self-requested a review September 21, 2022 16:22
Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for updating wit-component as well.

@alexcrichton alexcrichton merged commit 6519762 into bytecodealliance:main Sep 22, 2022
@alexcrichton alexcrichton deleted the sync-types branch September 22, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants