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