forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (bytecodealli…
…ance#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 <joel.dice@fermyon.com> add wasmparser::WasmFeatures support to wasm-compose Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix no-std build in readers.rs Signed-off-by: Joel Dice <joel.dice@fermyon.com> rename `error` to `error-context` per latest spec Signed-off-by: Joel Dice <joel.dice@fermyon.com> 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 <joel.dice@fermyon.com> 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 <joel.dice@fermyon.com> more wast async support and more tests This also fixes a bug in `wasmprinter` keeping track of core functions. Signed-off-by: Joel Dice <joel.dice@fermyon.com> more wast async support; add async tests; fix bugs Signed-off-by: Joel Dice <joel.dice@fermyon.com> more component-model-async tests and fixes Signed-off-by: Joel Dice <joel.dice@fermyon.com> add `wit-parser` tests for streams, futures, and error-contexts Signed-off-by: Joel Dice <joel.dice@fermyon.com> 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 <joel.dice@fermyon.com> add more async tests Signed-off-by: Joel Dice <joel.dice@fermyon.com> add `async-builtins` test for `wit-component` Signed-off-by: Joel Dice <joel.dice@fermyon.com> add `async-streams-and-futures` test to `wit-component` Signed-off-by: Joel Dice <joel.dice@fermyon.com> fix stream/future type handling for exported interfaces Signed-off-by: Joel Dice <joel.dice@fermyon.com> support callback-less (AKA stackful) async lifts Signed-off-by: Joel Dice <joel.dice@fermyon.com> address review feedback Signed-off-by: Joel Dice <joel.dice@fermyon.com> * address more review feedback Signed-off-by: Joel Dice <joel.dice@fermyon.com> * fix test build regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> * fix more test regressions Signed-off-by: Joel Dice <joel.dice@fermyon.com> * remove need for `Default` impls in `wast::component::func` Signed-off-by: Joel Dice <joel.dice@fermyon.com> * fix another test regression Signed-off-by: Joel Dice <joel.dice@fermyon.com> * minor code simplification Signed-off-by: Joel Dice <joel.dice@fermyon.com> * require wasmparser `features` feature in wasm-compose This fixes `cargo check --no-default-features --feature compose`. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * require wasmparser `features` feature in wit-parser Signed-off-by: Joel Dice <joel.dice@fermyon.com> * simplify `r#async` parsing code Signed-off-by: Joel Dice <joel.dice@fermyon.com> * add a bunch of comments to wit-component async code Signed-off-by: Joel Dice <joel.dice@fermyon.com> * allow importing the same function sync and async Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com>
- Loading branch information
1 parent
9366531
commit f66db90
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.