-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: component bindgen: add support for multiple wit paths (#9288)
* feat: bindgen: add support for multiple wit paths * expanded tests * fmt --------- Co-authored-by: Lochlan Wansbrough <>
- Loading branch information
1 parent
93a1f08
commit 80d678a
Showing
10 changed files
with
1,427 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,7 @@ mod with_key_and_resources { | |
|
||
mod trappable_errors_with_versioned_and_unversioned_packages { | ||
wasmtime::component::bindgen!({ | ||
world: "foo:foo/nope", | ||
inline: " | ||
package foo:[email protected]; | ||
|
@@ -697,3 +698,19 @@ mod trappable_error_type_and_versions { | |
}); | ||
} | ||
} | ||
|
||
mod paths { | ||
mod multiple_paths { | ||
wasmtime::component::bindgen!({ | ||
world: "test:paths/test", | ||
inline: r#" | ||
package test:paths; | ||
world test { | ||
import paths:path1/test; | ||
export paths:path2/test; | ||
} | ||
"#, | ||
path: ["tests/codegen/path1", "tests/codegen/path2"], | ||
}); | ||
} | ||
} |
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,7 @@ | ||
package paths:path1; | ||
|
||
interface test {} | ||
|
||
world path1 { | ||
import test; | ||
} |
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,7 @@ | ||
package paths:path2; | ||
|
||
interface test {} | ||
|
||
world path2 { | ||
import test; | ||
} |
Oops, something went wrong.