Files
cli/vendor/wit-component/tests/components/tricky-resources3/component.wat

45 lines
1.7 KiB
Plaintext
Raw Normal View History

(component
(core module $main (;0;)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
(processed-by "my-fake-bindgen" "123.45")
)
)
(type $name (;0;) (resource (rep i32)))
(core instance $main (;0;) (instantiate $main))
(component $foo:bar/foo-shim-component (;0;)
(import "import-type-name" (type (;0;) (sub resource)))
(export (;1;) "name" (type 0))
)
(instance $foo:bar/foo-shim-instance (;0;) (instantiate $foo:bar/foo-shim-component
(with "import-type-name" (type $name))
)
)
(export $foo:bar/foo (;1;) "foo:bar/foo" (instance $foo:bar/foo-shim-instance))
(alias export $foo:bar/foo "name" (type $"#type1 name" (@name "name") (;1;)))
(component $foo:bar/name-shim-component (;1;)
(import "import-type-name" (type (;0;) (sub resource)))
(export (;1;) "name" (type 0))
)
(instance $foo:bar/name-shim-instance (;2;) (instantiate $foo:bar/name-shim-component
(with "import-type-name" (type $"#type1 name"))
)
)
(export $foo:bar/name (;3;) "foo:bar/name" (instance $foo:bar/name-shim-instance))
(alias export $foo:bar/name "name" (type $"#type2 name" (@name "name") (;2;)))
(component $name-shim-component (;2;)
(import "import-type-name" (type (;0;) (sub resource)))
(import "import-type-name0" (type (;1;) (eq 0)))
(export (;2;) "name" (type 1))
)
(instance $name-shim-instance (;4;) (instantiate $name-shim-component
(with "import-type-name" (type $"#type1 name"))
(with "import-type-name0" (type $"#type2 name"))
)
)
(export $name (;5;) "name" (instance $name-shim-instance))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)