Files
cli/vendor/wit-component/tests/components/async-export/component.wat

92 lines
4.6 KiB
Plaintext

(component
(core module $main (;0;)
(type (;0;) (func (param i32 i32)))
(type (;1;) (func))
(type (;2;) (func (param i32 i32 i32 i32) (result i32)))
(memory (;0;) 1)
(export "[async-lift-stackful]foo" (func 0))
(export "[async-lift-stackful]foo:foo/bar#foo" (func 1))
(export "[async-lift-stackful]foo:foo/bar#get-string" (func 2))
(export "[async-lift-stackful]foo:foo/bar#get-big" (func 3))
(export "memory" (memory 0))
(export "cabi_realloc" (func 4))
(func (;0;) (type 0) (param i32 i32)
unreachable
)
(func (;1;) (type 0) (param i32 i32)
unreachable
)
(func (;2;) (type 1)
unreachable
)
(func (;3;) (type 1)
unreachable
)
(func (;4;) (type 2) (param i32 i32 i32 i32) (result i32)
unreachable
)
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
(processed-by "my-fake-bindgen" "123.45")
)
)
(type (;0;) (record (field "a1" u8) (field "a2" u8) (field "a3" u8) (field "a4" u8)))
(type (;1;) (record (field "a1" 0) (field "a2" 0) (field "a3" 0) (field "a4" 0)))
(type (;2;) (record (field "a1" 1) (field "a2" 1) (field "a3" 1) (field "a4" 1)))
(core instance $main (;0;) (instantiate $main))
(alias core export $main "memory" (core memory $memory (;0;)))
(type (;3;) (func (param "s" string) (result string)))
(alias core export $main "[async-lift-stackful]foo" (core func $"[async-lift-stackful]foo" (;0;)))
(alias core export $main "cabi_realloc" (core func $cabi_realloc (;1;)))
(func $foo (;0;) (type 3) (canon lift (core func $"[async-lift-stackful]foo") (memory $memory) (realloc $cabi_realloc) string-encoding=utf8 async))
(export $"#func1 foo" (@name "foo") (;1;) "foo" (func $foo))
(type (;4;) (func (param "s" string) (result string)))
(alias core export $main "[async-lift-stackful]foo:foo/bar#foo" (core func $"[async-lift-stackful]foo:foo/bar#foo" (;2;)))
(func $"#func2 foo" (@name "foo") (;2;) (type 4) (canon lift (core func $"[async-lift-stackful]foo:foo/bar#foo") (memory $memory) (realloc $cabi_realloc) string-encoding=utf8 async))
(type (;5;) (func (result string)))
(alias core export $main "[async-lift-stackful]foo:foo/bar#get-string" (core func $"[async-lift-stackful]foo:foo/bar#get-string" (;3;)))
(func $get-string (;3;) (type 5) (canon lift (core func $"[async-lift-stackful]foo:foo/bar#get-string") (memory $memory) string-encoding=utf8 async))
(type (;6;) (func (result 2)))
(alias core export $main "[async-lift-stackful]foo:foo/bar#get-big" (core func $"[async-lift-stackful]foo:foo/bar#get-big" (;4;)))
(func $get-big (;4;) (type 6) (canon lift (core func $"[async-lift-stackful]foo:foo/bar#get-big") (memory $memory) async))
(component $foo:foo/bar-shim-component (;0;)
(type (;0;) (func (param "s" string) (result string)))
(import "import-func-foo" (func (;0;) (type 0)))
(type (;1;) (func (result string)))
(import "import-func-get-string" (func (;1;) (type 1)))
(type (;2;) (record (field "a1" u8) (field "a2" u8) (field "a3" u8) (field "a4" u8)))
(import "import-type-big3" (type (;3;) (eq 2)))
(type (;4;) (record (field "a1" 3) (field "a2" 3) (field "a3" 3) (field "a4" 3)))
(import "import-type-big2" (type (;5;) (eq 4)))
(type (;6;) (record (field "a1" 5) (field "a2" 5) (field "a3" 5) (field "a4" 5)))
(import "import-type-big" (type (;7;) (eq 6)))
(type (;8;) (func (result 7)))
(import "import-func-get-big" (func (;2;) (type 8)))
(type (;9;) (record (field "a1" u8) (field "a2" u8) (field "a3" u8) (field "a4" u8)))
(export (;10;) "big3" (type 9))
(type (;11;) (record (field "a1" 10) (field "a2" 10) (field "a3" 10) (field "a4" 10)))
(export (;12;) "big2" (type 11))
(type (;13;) (record (field "a1" 12) (field "a2" 12) (field "a3" 12) (field "a4" 12)))
(export (;14;) "big" (type 13))
(type (;15;) (func (param "s" string) (result string)))
(export (;3;) "foo" (func 0) (func (type 15)))
(type (;16;) (func (result string)))
(export (;4;) "get-string" (func 1) (func (type 16)))
(type (;17;) (func (result 14)))
(export (;5;) "get-big" (func 2) (func (type 17)))
)
(instance $foo:foo/bar-shim-instance (;0;) (instantiate $foo:foo/bar-shim-component
(with "import-func-foo" (func $"#func2 foo"))
(with "import-func-get-string" (func $get-string))
(with "import-func-get-big" (func $get-big))
(with "import-type-big3" (type 0))
(with "import-type-big2" (type 1))
(with "import-type-big" (type 2))
)
)
(export $foo:foo/bar (;1;) "foo:foo/bar" (instance $foo:foo/bar-shim-instance))
(@producers
(processed-by "wit-component" "$CARGO_PKG_VERSION")
)
)