-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
8 changed files
with
80 additions
and
10 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
30 changes: 30 additions & 0 deletions
30
crates/wit-component/tests/components/async-export/component.wat
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
(component | ||
(core module (;0;) | ||
(type (;0;) (func (param i32 i32) (result i32))) | ||
(type (;1;) (func (param i32 i32 i32 i32) (result i32))) | ||
(memory (;0;) 1) | ||
(export "[async]foo" (func 0)) | ||
(export "memory" (memory 0)) | ||
(export "cabi_realloc" (func 1)) | ||
(func (;0;) (type 0) (param i32 i32) (result i32) | ||
unreachable | ||
) | ||
(func (;1;) (type 1) (param i32 i32 i32 i32) (result i32) | ||
unreachable | ||
) | ||
(@producers | ||
(processed-by "wit-component" "$CARGO_PKG_VERSION") | ||
(processed-by "my-fake-bindgen" "123.45") | ||
) | ||
) | ||
(core instance (;0;) (instantiate 0)) | ||
(alias core export 0 "memory" (core memory (;0;))) | ||
(type (;0;) (func (param "s" string) (result string))) | ||
(alias core export 0 "[async]foo" (core func (;0;))) | ||
(alias core export 0 "cabi_realloc" (core func (;1;))) | ||
(func (;0;) (type 0) (canon lift (core func 0) (memory 0) (realloc 1) string-encoding=utf8 async)) | ||
(export (;1;) "foo" (func 0)) | ||
(@producers | ||
(processed-by "wit-component" "$CARGO_PKG_VERSION") | ||
) | ||
) |
5 changes: 5 additions & 0 deletions
5
crates/wit-component/tests/components/async-export/component.wit.print
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package root:component; | ||
|
||
world root { | ||
export foo: func(s: string) -> string; | ||
} |
5 changes: 5 additions & 0 deletions
5
crates/wit-component/tests/components/async-export/module.wat
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(module | ||
(func (export "[async]foo") (param i32 i32) (result i32) unreachable) | ||
(memory (export "memory") 1) | ||
(func (export "cabi_realloc") (param i32 i32 i32 i32) (result i32) unreachable) | ||
) |
5 changes: 5 additions & 0 deletions
5
crates/wit-component/tests/components/async-export/module.wit
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package foo:foo; | ||
|
||
world module { | ||
export foo: func(s: string) -> string; | ||
} |
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