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

51 lines
1.7 KiB
Plaintext

(component
(core module $main (;0;)
(type (;0;) (func (result i32)))
(export "anon#foo" (func 0))
(func (;0;) (type 0) (result i32)
unreachable
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
(processed-by "my-fake-bindgen" "123.45")
)
)
(type $r (;0;) (resource (rep i32)))
(core instance $main (;0;) (instantiate $main))
(component $foo:bar/a-shim-component (;0;)
(import "import-type-r" (type (;0;) (sub resource)))
(export (;1;) "r" (type 0))
)
(instance $foo:bar/a-shim-instance (;0;) (instantiate $foo:bar/a-shim-component
(with "import-type-r" (type $r))
)
)
(export $foo:bar/a (;1;) "foo:bar/a" (instance $foo:bar/a-shim-instance))
(type (;1;) (own $r))
(type (;2;) (func (result 1)))
(alias core export $main "anon#foo" (core func $anon#foo (;0;)))
(func $foo (;0;) (type 2) (canon lift (core func $anon#foo)))
(alias export $foo:bar/a "r" (type $"#type3 r" (@name "r") (;3;)))
(component $anon-shim-component (;1;)
(import "import-type-r" (type (;0;) (sub resource)))
(import "import-type-r0" (type (;1;) (eq 0)))
(type (;2;) (own 1))
(type (;3;) (func (result 2)))
(import "import-func-foo" (func (;0;) (type 3)))
(export (;4;) "r" (type 0))
(type (;5;) (own 4))
(type (;6;) (func (result 5)))
(export (;1;) "foo" (func 0) (func (type 6)))
)
(instance $anon-shim-instance (;2;) (instantiate $anon-shim-component
(with "import-func-foo" (func $foo))
(with "import-type-r" (type $"#type3 r"))
(with "import-type-r0" (type $r))
)
)
(export $anon (;3;) "anon" (instance $anon-shim-instance))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)