forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
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
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. Note that the `error` type was recently (about 30 minutes ago) renamed to `error-context` in Luke's spec PR. I haven't updated this implementation to reflect that yet, but will do so in a follow-up commit. That should allow us to avoid conflicts with existing WIT files that use `error` as a type and/or interface name. This does not include any new tests; I'll also add those in a follow-up commit. 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>
- Loading branch information
Showing
116 changed files
with
8,946 additions
and
351 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
Oops, something went wrong.