Debian Codegraph @

crates/wit-component/tests/components/link-stubs/component.wat

raw
1 (component
2 (type (;0;)
3 (instance
4 (type (;0;) (func (param "v" s32) (result s32)))
5 (export (;0;) "foo" (func (type 0)))
6 )
7 )
8 (import "test:test/test" (instance (;0;) (type 0)))
9 (core module (;0;)
10 (table (;0;) 2 funcref)
11 (memory (;0;) 17)
12 (global (;0;) (mut i32) i32.const 1048576)
13 (global (;1;) i32 i32.const 1048592)
14 (global (;2;) i32 i32.const 1)
15 (global (;3;) i32 i32.const 1048592)
16 (global (;4;) i32 i32.const 2)
17 (global (;5;) (mut i32) i32.const 1048592)
18 (global (;6;) (mut i32) i32.const 1114112)
19 (export "__stack_pointer" (global 0))
20 (export "foo:memory_base" (global 1))
21 (export "foo:table_base" (global 2))
22 (export "wit-component:stubs:memory_base" (global 3))
23 (export "wit-component:stubs:table_base" (global 4))
24 (export "__heap_base" (global 5))
25 (export "__heap_end" (global 6))
26 (export "__indirect_function_table" (table 0))
27 (export "memory" (memory 0))
28 (@producers
29 (processed-by "wit-component" "$CARGO_PKG_VERSION")
30 )
31 )
32 (core module (;1;)
33 (type (;0;) (func (param i32) (result i32)))
34 (type (;1;) (func (param i32) (result i32)))
35 (export "bar" (func 0))
36 (export "foo" (func 1))
37 (func (;0;) (type 0) (param i32) (result i32)
38 unreachable
39 )
40 (func (;1;) (type 1) (param i32) (result i32)
41 unreachable
42 )
43 (@producers
44 (processed-by "wit-component" "$CARGO_PKG_VERSION")
45 )
46 )
47 (core module (;2;)
48 (@dylink.0
49 (mem-info (memory 0 4))
50 )
51 (type (;0;) (func (param i32) (result i32)))
52 (import "test:test/test" "foo" (func $import_foo (;0;) (type 0)))
53 (import "env" "foo" (func $import_foo2 (;1;) (type 0)))
54 (import "env" "bar" (func $import_bar (;2;) (type 0)))
55 (export "test:test/test#foo" (func $foo))
56 (func $foo (;3;) (type 0) (param i32) (result i32)
57 unreachable
58 )
59 )
60 (core module (;3;)
61 (type (;0;) (func))
62 (type (;1;) (func (param i32)))
63 (import "env" "memory" (memory (;0;) 0))
64 (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
65 (start 0)
66 (elem (;0;) (i32.const 1) func)
67 (elem (;1;) (i32.const 2) func)
68 (func (;0;) (type 0))
69 (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
70 (@producers
71 (processed-by "wit-component" "$CARGO_PKG_VERSION")
72 )
73 )
74 (core instance (;0;) (instantiate 0))
75 (alias core export 0 "memory" (core memory (;0;)))
76 (core instance (;1;) (instantiate 1))
77 (alias export 0 "foo" (func (;0;)))
78 (core func (;0;) (canon lower (func 0)))
79 (core instance (;2;)
80 (export "foo" (func 0))
81 )
82 (alias core export 1 "foo" (core func (;1;)))
83 (alias core export 1 "bar" (core func (;2;)))
84 (core instance (;3;)
85 (export "foo" (func 1))
86 (export "bar" (func 2))
87 )
88 (core instance (;4;) (instantiate 2
89 (with "test:test/test" (instance 2))
90 (with "env" (instance 3))
91 )
92 )
93 (core instance (;5;) (instantiate 3
94 (with "env" (instance 0))
95 )
96 )
97 (type (;1;) (func (param "v" s32) (result s32)))
98 (alias core export 4 "test:test/test#foo" (core func (;3;)))
99 (func (;1;) (type 1) (canon lift (core func 3)))
100 (component (;0;)
101 (type (;0;) (func (param "v" s32) (result s32)))
102 (import "import-func-foo" (func (;0;) (type 0)))
103 (type (;1;) (func (param "v" s32) (result s32)))
104 (export (;1;) "foo" (func 0) (func (type 1)))
105 )
106 (instance (;1;) (instantiate 0
107 (with "import-func-foo" (func 1))
108 )
109 )
110 (export (;2;) "test:test/test" (instance 1))
111 (@producers
112 (processed-by "wit-component" "$CARGO_PKG_VERSION")
113 )
114 )