38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
|
|
(component
|
||
|
|
(type $ty-foo:foo/foo (;0;)
|
||
|
|
(instance
|
||
|
|
(type (;0;) (record (field "f" u32)))
|
||
|
|
(export (;1;) "f" (type (eq 0)))
|
||
|
|
(type (;2;) (record (field "f" 1)))
|
||
|
|
(export (;3;) "r" (type (eq 2)))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(import "foo:foo/foo" (instance $foo:foo/foo (;0;) (type $ty-foo:foo/foo)))
|
||
|
|
(core module $main (;0;)
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
(processed-by "my-fake-bindgen" "123.45")
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(alias export $foo:foo/foo "r" (type $r (;1;)))
|
||
|
|
(core instance $main (;0;) (instantiate $main))
|
||
|
|
(alias export $foo:foo/foo "f" (type $f (;2;)))
|
||
|
|
(alias export $foo:foo/foo "r" (type $"#type3 r" (@name "r") (;3;)))
|
||
|
|
(component $x-shim-component (;0;)
|
||
|
|
(type (;0;) (record (field "f" u32)))
|
||
|
|
(import "import-type-f" (type (;1;) (eq 0)))
|
||
|
|
(type (;2;) (record (field "f" 1)))
|
||
|
|
(import "import-type-r" (type (;3;) (eq 2)))
|
||
|
|
(export (;4;) "r" (type 3))
|
||
|
|
)
|
||
|
|
(instance $x-shim-instance (;1;) (instantiate $x-shim-component
|
||
|
|
(with "import-type-f" (type $f))
|
||
|
|
(with "import-type-r" (type $"#type3 r"))
|
||
|
|
)
|
||
|
|
)
|
||
|
|
(export $x (;2;) "x" (instance $x-shim-instance))
|
||
|
|
(@producers
|
||
|
|
(processed-by "wit-component" "$CARGO_PKG_VERSION")
|
||
|
|
)
|
||
|
|
)
|