-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for async ABI, futures, streams, and errors (#1895)
* Add support for async ABI, futures, streams, and errors This adds support for encoding and parsing components which use the [Async ABI](https://github.com/WebAssembly/component-model/blob/main/design/mvp/Async.md) and associated canonical options and functions, along with the [`stream`, `future`, and `error`](WebAssembly/component-model#405) types. See bytecodealliance/rfcs#38 for more context. Signed-off-by: Joel Dice <[email protected]> add wasmparser::WasmFeatures support to wasm-compose Signed-off-by: Joel Dice <[email protected]> fix no-std build in readers.rs Signed-off-by: Joel Dice <[email protected]> rename `error` to `error-context` per latest spec Signed-off-by: Joel Dice <[email protected]> rename `error` to `error-context` per latest spec (part 2) Also, parse string encoding and realloc from encoded `error-context.new` and `error-context.debug-string` names. Signed-off-by: Joel Dice <[email protected]> add `wast` support for parsing async canon opts And add tests/local/component-model-async/lift-async.wast for round-trip testing of async lifts (more to come). Signed-off-by: Joel Dice <[email protected]> more wast async support and more tests This also fixes a bug in `wasmprinter` keeping track of core functions. Signed-off-by: Joel Dice <[email protected]> more wast async support; add async tests; fix bugs Signed-off-by: Joel Dice <[email protected]> more component-model-async tests and fixes Signed-off-by: Joel Dice <[email protected]> add `wit-parser` tests for streams, futures, and error-contexts Signed-off-by: Joel Dice <[email protected]> add first `wit-component` async test This required adding a new `wit_parser::decoding::decode_reader_with_features` function for passing `WasmFeatures` to `wasmparser::Validator::new_with_features`. Signed-off-by: Joel Dice <[email protected]> add more async tests Signed-off-by: Joel Dice <[email protected]> add `async-builtins` test for `wit-component` Signed-off-by: Joel Dice <[email protected]> add `async-streams-and-futures` test to `wit-component` Signed-off-by: Joel Dice <[email protected]> fix stream/future type handling for exported interfaces Signed-off-by: Joel Dice <[email protected]> support callback-less (AKA stackful) async lifts Signed-off-by: Joel Dice <[email protected]> address review feedback Signed-off-by: Joel Dice <[email protected]> * address more review feedback Signed-off-by: Joel Dice <[email protected]> * fix test build regression Signed-off-by: Joel Dice <[email protected]> * fix more test regressions Signed-off-by: Joel Dice <[email protected]> * remove need for `Default` impls in `wast::component::func` Signed-off-by: Joel Dice <[email protected]> * fix another test regression Signed-off-by: Joel Dice <[email protected]> * minor code simplification Signed-off-by: Joel Dice <[email protected]> * require wasmparser `features` feature in wasm-compose This fixes `cargo check --no-default-features --feature compose`. Signed-off-by: Joel Dice <[email protected]> * require wasmparser `features` feature in wit-parser Signed-off-by: Joel Dice <[email protected]> * simplify `r#async` parsing code Signed-off-by: Joel Dice <[email protected]> * add a bunch of comments to wit-component async code Signed-off-by: Joel Dice <[email protected]> * allow importing the same function sync and async Signed-off-by: Joel Dice <[email protected]> --------- Signed-off-by: Joel Dice <[email protected]>
- Loading branch information
Showing
115 changed files
with
8,579 additions
and
439 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.