-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explicit packages encoded as nested components
- Loading branch information
Showing
74 changed files
with
352 additions
and
110 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
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
32 changes: 32 additions & 0 deletions
32
crates/wit-component/tests/interfaces/multiple-packages.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,32 @@ | ||
(component | ||
(component $foo:bar (;0;) | ||
(@custom "package-docs" "\00{}") | ||
(type (;0;) | ||
(component | ||
(type (;0;) | ||
(component | ||
(type (;0;) | ||
(instance | ||
(type (;0;) (record (field "foo" string))) | ||
(export (;1;) "my-record" (type (eq 0))) | ||
) | ||
) | ||
(import "another:thing/something" (instance (;0;) (type 0))) | ||
(type (;1;) | ||
(instance | ||
(type (;0;) (record (field "foo" string))) | ||
(export (;1;) "other-record" (type (eq 0))) | ||
) | ||
) | ||
(import "third:pkg/things" (instance (;1;) (type 1))) | ||
) | ||
) | ||
(export (;0;) "foo:bar/this-world" (component (type 0))) | ||
) | ||
) | ||
(export (;1;) "this-world" (type 0)) | ||
) | ||
(@producers | ||
(processed-by "wit-component" "$CARGO_PKG_VERSION") | ||
) | ||
) |
26 changes: 26 additions & 0 deletions
26
crates/wit-component/tests/interfaces/multiple-packages.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,26 @@ | ||
package foo:bar { | ||
world this-world { | ||
import another:thing/something; | ||
import third:pkg/things; | ||
} | ||
} | ||
|
||
package another:thing { | ||
// documenting an interface | ||
interface something { | ||
@since(version = 1.2.3) | ||
record my-record { | ||
foo: string | ||
} | ||
} | ||
} | ||
|
||
package third:pkg { | ||
@since(version = 1.2.3) | ||
interface things { | ||
// documenting an type | ||
record other-record { | ||
foo: string | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
crates/wit-component/tests/interfaces/multiple-packages.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,4 @@ | ||
package root:component; | ||
|
||
world root { | ||
} |
Oops, something went wrong.