Debian Codegraph @

crates/wit-component/tests/components/exports/component.wat

raw
1 (component
2 (core module (;0;)
3 (type (;0;) (func (param i32 i32 i32 i32) (result i32)))
4 (type (;1;) (func))
5 (type (;2;) (func (param i32 i32 i32 i64) (result i32)))
6 (type (;3;) (func (param i32)))
7 (type (;4;) (func (result i32)))
8 (type (;5;) (func (param i32 i32) (result i32)))
9 (type (;6;) (func (param i32 i64 i32) (result i32)))
10 (memory (;0;) 1)
11 (export "memory" (memory 0))
12 (export "cabi_realloc" (func 0))
13 (export "a" (func 1))
14 (export "b" (func 2))
15 (export "cabi_post_b" (func 3))
16 (export "c" (func 4))
17 (export "foo#a" (func 5))
18 (export "foo#b" (func 6))
19 (export "cabi_post_foo#b" (func 7))
20 (export "foo#c" (func 8))
21 (export "cabi_post_foo#c" (func 9))
22 (export "bar#a" (func 10))
23 (func (;0;) (type 0) (param i32 i32 i32 i32) (result i32)
24 unreachable
25 )
26 (func (;1;) (type 1)
27 unreachable
28 )
29 (func (;2;) (type 2) (param i32 i32 i32 i64) (result i32)
30 unreachable
31 )
32 (func (;3;) (type 3) (param i32)
33 unreachable
34 )
35 (func (;4;) (type 4) (result i32)
36 unreachable
37 )
38 (func (;5;) (type 1)
39 unreachable
40 )
41 (func (;6;) (type 5) (param i32 i32) (result i32)
42 unreachable
43 )
44 (func (;7;) (type 3) (param i32)
45 unreachable
46 )
47 (func (;8;) (type 6) (param i32 i64 i32) (result i32)
48 unreachable
49 )
50 (func (;9;) (type 3) (param i32)
51 unreachable
52 )
53 (func (;10;) (type 3) (param i32)
54 unreachable
55 )
56 (@producers
57 (processed-by "wit-component" "$CARGO_PKG_VERSION")
58 (processed-by "my-fake-bindgen" "123.45")
59 )
60 )
61 (type (;0;) (flags "a" "b" "c"))
62 (type (;1;) (variant (case "a") (case "b" string) (case "c" s64)))
63 (core instance (;0;) (instantiate 0))
64 (alias core export 0 "memory" (core memory (;0;)))
65 (type (;2;) (func))
66 (alias core export 0 "a" (core func (;0;)))
67 (alias core export 0 "cabi_realloc" (core func (;1;)))
68 (func (;0;) (type 2) (canon lift (core func 0)))
69 (export (;1;) "a" (func 0))
70 (type (;3;) (func (param "a" s8) (param "b" s16) (param "c" s32) (param "d" s64) (result string)))
71 (alias core export 0 "b" (core func (;2;)))
72 (alias core export 0 "cabi_post_b" (core func (;3;)))
73 (func (;2;) (type 3) (canon lift (core func 2) (memory 0) string-encoding=utf8 (post-return 3)))
74 (export (;3;) "b" (func 2))
75 (type (;4;) (tuple s8 s16 s32 s64))
76 (type (;5;) (func (result 4)))
77 (alias core export 0 "c" (core func (;4;)))
78 (func (;4;) (type 5) (canon lift (core func 4) (memory 0)))
79 (export (;5;) "c" (func 4))
80 (type (;6;) (func (param "x" 0)))
81 (alias core export 0 "bar#a" (core func (;5;)))
82 (func (;6;) (type 6) (canon lift (core func 5)))
83 (component (;0;)
84 (type (;0;) (flags "a" "b" "c"))
85 (import "import-type-x" (type (;1;) (eq 0)))
86 (type (;2;) (func (param "x" 1)))
87 (import "import-func-a" (func (;0;) (type 2)))
88 (type (;3;) (flags "a" "b" "c"))
89 (export (;4;) "x" (type 3))
90 (type (;5;) (func (param "x" 4)))
91 (export (;1;) "a" (func 0) (func (type 5)))
92 )
93 (instance (;0;) (instantiate 0
94 (with "import-func-a" (func 6))
95 (with "import-type-x" (type 0))
96 )
97 )
98 (export (;1;) "bar" (instance 0))
99 (type (;7;) (func))
100 (alias core export 0 "foo#a" (core func (;6;)))
101 (func (;7;) (type 7) (canon lift (core func 6)))
102 (type (;8;) (func (param "x" string) (result 1)))
103 (alias core export 0 "foo#b" (core func (;7;)))
104 (alias core export 0 "cabi_post_foo#b" (core func (;8;)))
105 (func (;8;) (type 8) (canon lift (core func 7) (memory 0) (realloc 1) string-encoding=utf8 (post-return 8)))
106 (type (;9;) (func (param "x" 1) (result string)))
107 (alias core export 0 "foo#c" (core func (;9;)))
108 (alias core export 0 "cabi_post_foo#c" (core func (;10;)))
109 (func (;9;) (type 9) (canon lift (core func 9) (memory 0) (realloc 1) string-encoding=utf8 (post-return 10)))
110 (component (;1;)
111 (type (;0;) (func))
112 (import "import-func-a" (func (;0;) (type 0)))
113 (type (;1;) (variant (case "a") (case "b" string) (case "c" s64)))
114 (import "import-type-x" (type (;2;) (eq 1)))
115 (type (;3;) (func (param "x" string) (result 2)))
116 (import "import-func-b" (func (;1;) (type 3)))
117 (type (;4;) (func (param "x" 2) (result string)))
118 (import "import-func-c" (func (;2;) (type 4)))
119 (type (;5;) (variant (case "a") (case "b" string) (case "c" s64)))
120 (export (;6;) "x" (type 5))
121 (type (;7;) (func))
122 (export (;3;) "a" (func 0) (func (type 7)))
123 (type (;8;) (func (param "x" string) (result 6)))
124 (export (;4;) "b" (func 1) (func (type 8)))
125 (type (;9;) (func (param "x" 6) (result string)))
126 (export (;5;) "c" (func 2) (func (type 9)))
127 )
128 (instance (;2;) (instantiate 1
129 (with "import-func-a" (func 7))
130 (with "import-func-b" (func 8))
131 (with "import-func-c" (func 9))
132 (with "import-type-x" (type 1))
133 )
134 )
135 (export (;3;) "foo" (instance 2))
136 (@producers
137 (processed-by "wit-component" "$CARGO_PKG_VERSION")
138 )
139 )