wit-component 0.3.2

Tooling for working with `*.wit` and component files together.
Documentation
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
(component
  (type (;0;) (enum "a"))
  (type (;1;) (union u32 float32))
  (type (;2;) (record))
  (type (;3;) (variant (case "a") (case "b" 1) (case "c" 0) (case "d" string) (case "e" 2) (case "f") (case "g" u32)))
  (type (;4;) (variant (case "a" s32) (case "b" float32)))
  (type (;5;) (variant (case "a" float64) (case "b" float32)))
  (type (;6;) (variant (case "a" float64) (case "b" u64)))
  (type (;7;) (variant (case "a" u32) (case "b" s64)))
  (type (;8;) (variant (case "a" float32) (case "b" s64)))
  (type (;9;) (tuple float32 u32))
  (type (;10;) (tuple u32 u32))
  (type (;11;) (variant (case "a" 9) (case "b" 10)))
  (type (;12;) (enum "bad1" "bad2"))
  (type (;13;) (func (param "x" 0)))
  (type (;14;) (func (result 0)))
  (type (;15;) (func (param "x" 1)))
  (type (;16;) (func (result 1)))
  (type (;17;) (func (param "x" 3)))
  (type (;18;) (func (result 3)))
  (type (;19;) (func (param "x" bool)))
  (type (;20;) (func (result bool)))
  (type (;21;) (option bool))
  (type (;22;) (tuple))
  (type (;23;) (option 22))
  (type (;24;) (option u32))
  (type (;25;) (option 0))
  (type (;26;) (option float32))
  (type (;27;) (option 1))
  (type (;28;) (option 21))
  (type (;29;) (func (param "a" 21) (param "b" 23) (param "c" 24) (param "d" 25) (param "e" 26) (param "f" 27) (param "g" 28)))
  (type (;30;) (tuple 21 23 24 25 26 27 28))
  (type (;31;) (func (result 30)))
  (type (;32;) (tuple 4 5 6 7 8 11))
  (type (;33;) (func (param "a" 4) (param "b" 5) (param "c" 6) (param "d" 7) (param "e" 8) (param "f" 11) (result 32)))
  (type (;34;) (result))
  (type (;35;) (result (error 0)))
  (type (;36;) (result 0))
  (type (;37;) (result 22 (error 22)))
  (type (;38;) (result u32 (error 3)))
  (type (;39;) (list u8))
  (type (;40;) (result string (error 39)))
  (type (;41;) (func (param "a" 34) (param "b" 35) (param "c" 36) (param "d" 37) (param "e" 38) (param "f" 40)))
  (type (;42;) (tuple 34 35 36 37 38 40))
  (type (;43;) (func (result 42)))
  (type (;44;) (result s32 (error 12)))
  (type (;45;) (func (result 44)))
  (type (;46;) (result (error 12)))
  (type (;47;) (func (result 46)))
  (type (;48;) (result 12 (error 12)))
  (type (;49;) (func (result 48)))
  (type (;50;) (tuple s32 u32))
  (type (;51;) (result 50 (error 12)))
  (type (;52;) (func (result 51)))
  (type (;53;) (option s32))
  (type (;54;) (func (result 53)))
  (type (;55;) (option 12))
  (type (;56;) (func (result 55)))
  (type (;57;) (result u32 (error s32)))
  (type (;58;) (func (result 57)))
  (type (;59;)
    (instance
      (alias outer 1 0 (type (;0;)))
      (export "e1" (type (eq 0)))
      (alias outer 1 1 (type (;1;)))
      (export "u1" (type (eq 1)))
      (alias outer 1 2 (type (;2;)))
      (export "empty" (type (eq 2)))
      (alias outer 1 3 (type (;3;)))
      (export "v1" (type (eq 3)))
      (alias outer 1 4 (type (;4;)))
      (export "casts1" (type (eq 4)))
      (alias outer 1 5 (type (;5;)))
      (export "casts2" (type (eq 5)))
      (alias outer 1 6 (type (;6;)))
      (export "casts3" (type (eq 6)))
      (alias outer 1 7 (type (;7;)))
      (export "casts4" (type (eq 7)))
      (alias outer 1 8 (type (;8;)))
      (export "casts5" (type (eq 8)))
      (alias outer 1 11 (type (;9;)))
      (export "casts6" (type (eq 9)))
      (alias outer 1 12 (type (;10;)))
      (export "my-errno" (type (eq 10)))
      (alias outer 1 13 (type (;11;)))
      (export "e1-arg" (func (type 11)))
      (alias outer 1 14 (type (;12;)))
      (export "e1-result" (func (type 12)))
      (alias outer 1 15 (type (;13;)))
      (export "u1-arg" (func (type 13)))
      (alias outer 1 16 (type (;14;)))
      (export "u1-result" (func (type 14)))
      (alias outer 1 17 (type (;15;)))
      (export "v1-arg" (func (type 15)))
      (alias outer 1 18 (type (;16;)))
      (export "v1-result" (func (type 16)))
      (alias outer 1 19 (type (;17;)))
      (export "bool-arg" (func (type 17)))
      (alias outer 1 20 (type (;18;)))
      (export "bool-result" (func (type 18)))
      (alias outer 1 29 (type (;19;)))
      (export "option-arg" (func (type 19)))
      (alias outer 1 31 (type (;20;)))
      (export "option-result" (func (type 20)))
      (alias outer 1 33 (type (;21;)))
      (export "casts" (func (type 21)))
      (alias outer 1 41 (type (;22;)))
      (export "expected-arg" (func (type 22)))
      (alias outer 1 43 (type (;23;)))
      (export "expected-result" (func (type 23)))
      (alias outer 1 45 (type (;24;)))
      (export "return-expected-sugar" (func (type 24)))
      (alias outer 1 47 (type (;25;)))
      (export "return-expected-sugar2" (func (type 25)))
      (alias outer 1 49 (type (;26;)))
      (export "return-expected-sugar3" (func (type 26)))
      (alias outer 1 52 (type (;27;)))
      (export "return-expected-sugar4" (func (type 27)))
      (alias outer 1 54 (type (;28;)))
      (export "return-option-sugar" (func (type 28)))
      (alias outer 1 56 (type (;29;)))
      (export "return-option-sugar2" (func (type 29)))
      (alias outer 1 58 (type (;30;)))
      (export "expected-simple" (func (type 30)))
    )
  )
  (import "variants" (instance (;0;) (type 59)))
  (core module (;0;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (result i32)))
    (type (;2;) (func (param i32 i32)))
    (type (;3;) (func (param i32 i32 i32)))
    (type (;4;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 f32 i32 i32 i32 i32 i32 i32)))
    (type (;5;) (func (param i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32)))
    (type (;6;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)))
    (type (;7;) (func (param i32 i32 i32 i32) (result i32)))
    (import "variants" "e1-arg" (func (;0;) (type 0)))
    (import "variants" "e1-result" (func (;1;) (type 1)))
    (import "variants" "u1-arg" (func (;2;) (type 2)))
    (import "variants" "u1-result" (func (;3;) (type 0)))
    (import "variants" "v1-arg" (func (;4;) (type 3)))
    (import "variants" "v1-result" (func (;5;) (type 0)))
    (import "variants" "bool-arg" (func (;6;) (type 0)))
    (import "variants" "bool-result" (func (;7;) (type 1)))
    (import "variants" "option-arg" (func (;8;) (type 4)))
    (import "variants" "option-result" (func (;9;) (type 0)))
    (import "variants" "casts" (func (;10;) (type 5)))
    (import "variants" "expected-arg" (func (;11;) (type 6)))
    (import "variants" "expected-result" (func (;12;) (type 0)))
    (import "variants" "return-expected-sugar" (func (;13;) (type 0)))
    (import "variants" "return-expected-sugar2" (func (;14;) (type 0)))
    (import "variants" "return-expected-sugar3" (func (;15;) (type 0)))
    (import "variants" "return-expected-sugar4" (func (;16;) (type 0)))
    (import "variants" "return-option-sugar" (func (;17;) (type 0)))
    (import "variants" "return-option-sugar2" (func (;18;) (type 0)))
    (import "variants" "expected-simple" (func (;19;) (type 0)))
    (func (;20;) (type 7) (param i32 i32 i32 i32) (result i32)
      unreachable
    )
    (memory (;0;) 0)
    (export "memory" (memory 0))
    (export "cabi_realloc" (func 20))
  )
  (core module (;1;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (param i32 i32 i32)))
    (type (;2;) (func (param i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32)))
    (type (;3;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)))
    (func (;0;) (type 0) (param i32)
      local.get 0
      i32.const 0
      call_indirect (type 0)
    )
    (func (;1;) (type 1) (param i32 i32 i32)
      local.get 0
      local.get 1
      local.get 2
      i32.const 1
      call_indirect (type 1)
    )
    (func (;2;) (type 0) (param i32)
      local.get 0
      i32.const 2
      call_indirect (type 0)
    )
    (func (;3;) (type 0) (param i32)
      local.get 0
      i32.const 3
      call_indirect (type 0)
    )
    (func (;4;) (type 2) (param i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32)
      local.get 0
      local.get 1
      local.get 2
      local.get 3
      local.get 4
      local.get 5
      local.get 6
      local.get 7
      local.get 8
      local.get 9
      local.get 10
      local.get 11
      local.get 12
      local.get 13
      i32.const 4
      call_indirect (type 2)
    )
    (func (;5;) (type 3) (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
      local.get 0
      local.get 1
      local.get 2
      local.get 3
      local.get 4
      local.get 5
      local.get 6
      local.get 7
      local.get 8
      local.get 9
      local.get 10
      local.get 11
      local.get 12
      i32.const 5
      call_indirect (type 3)
    )
    (func (;6;) (type 0) (param i32)
      local.get 0
      i32.const 6
      call_indirect (type 0)
    )
    (func (;7;) (type 0) (param i32)
      local.get 0
      i32.const 7
      call_indirect (type 0)
    )
    (func (;8;) (type 0) (param i32)
      local.get 0
      i32.const 8
      call_indirect (type 0)
    )
    (func (;9;) (type 0) (param i32)
      local.get 0
      i32.const 9
      call_indirect (type 0)
    )
    (func (;10;) (type 0) (param i32)
      local.get 0
      i32.const 10
      call_indirect (type 0)
    )
    (func (;11;) (type 0) (param i32)
      local.get 0
      i32.const 11
      call_indirect (type 0)
    )
    (func (;12;) (type 0) (param i32)
      local.get 0
      i32.const 12
      call_indirect (type 0)
    )
    (func (;13;) (type 0) (param i32)
      local.get 0
      i32.const 13
      call_indirect (type 0)
    )
    (table (;0;) 14 14 funcref)
    (export "0" (func 0))
    (export "1" (func 1))
    (export "2" (func 2))
    (export "3" (func 3))
    (export "4" (func 4))
    (export "5" (func 5))
    (export "6" (func 6))
    (export "7" (func 7))
    (export "8" (func 8))
    (export "9" (func 9))
    (export "10" (func 10))
    (export "11" (func 11))
    (export "12" (func 12))
    (export "13" (func 13))
    (export "$imports" (table 0))
  )
  (core module (;2;)
    (type (;0;) (func (param i32)))
    (type (;1;) (func (param i32 i32 i32)))
    (type (;2;) (func (param i32 i32 i32 i64 i32 i64 i32 i64 i32 i64 i32 i32 i32 i32)))
    (type (;3;) (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)))
    (import "" "0" (func (;0;) (type 0)))
    (import "" "1" (func (;1;) (type 1)))
    (import "" "2" (func (;2;) (type 0)))
    (import "" "3" (func (;3;) (type 0)))
    (import "" "4" (func (;4;) (type 2)))
    (import "" "5" (func (;5;) (type 3)))
    (import "" "6" (func (;6;) (type 0)))
    (import "" "7" (func (;7;) (type 0)))
    (import "" "8" (func (;8;) (type 0)))
    (import "" "9" (func (;9;) (type 0)))
    (import "" "10" (func (;10;) (type 0)))
    (import "" "11" (func (;11;) (type 0)))
    (import "" "12" (func (;12;) (type 0)))
    (import "" "13" (func (;13;) (type 0)))
    (import "" "$imports" (table (;0;) 14 14 funcref))
    (elem (;0;) (i32.const 0) func 0 1 2 3 4 5 6 7 8 9 10 11 12 13)
  )
  (core instance (;0;) (instantiate 1))
  (alias core export 0 "0" (core func (;0;)))
  (alias core export 0 "1" (core func (;1;)))
  (alias core export 0 "2" (core func (;2;)))
  (alias core export 0 "3" (core func (;3;)))
  (alias core export 0 "4" (core func (;4;)))
  (alias core export 0 "5" (core func (;5;)))
  (alias core export 0 "6" (core func (;6;)))
  (alias core export 0 "7" (core func (;7;)))
  (alias core export 0 "8" (core func (;8;)))
  (alias core export 0 "9" (core func (;9;)))
  (alias core export 0 "10" (core func (;10;)))
  (alias core export 0 "11" (core func (;11;)))
  (alias core export 0 "12" (core func (;12;)))
  (alias core export 0 "13" (core func (;13;)))
  (alias export 0 "e1-arg" (func (;0;)))
  (core func (;14;) (canon lower (func 0)))
  (alias export 0 "e1-result" (func (;1;)))
  (core func (;15;) (canon lower (func 1)))
  (alias export 0 "u1-arg" (func (;2;)))
  (core func (;16;) (canon lower (func 2)))
  (alias export 0 "bool-arg" (func (;3;)))
  (core func (;17;) (canon lower (func 3)))
  (alias export 0 "bool-result" (func (;4;)))
  (core func (;18;) (canon lower (func 4)))
  (alias export 0 "option-arg" (func (;5;)))
  (core func (;19;) (canon lower (func 5)))
  (core instance (;1;)
    (export "u1-result" (func 0))
    (export "v1-arg" (func 1))
    (export "v1-result" (func 2))
    (export "option-result" (func 3))
    (export "casts" (func 4))
    (export "expected-arg" (func 5))
    (export "expected-result" (func 6))
    (export "return-expected-sugar" (func 7))
    (export "return-expected-sugar2" (func 8))
    (export "return-expected-sugar3" (func 9))
    (export "return-expected-sugar4" (func 10))
    (export "return-option-sugar" (func 11))
    (export "return-option-sugar2" (func 12))
    (export "expected-simple" (func 13))
    (export "e1-arg" (func 14))
    (export "e1-result" (func 15))
    (export "u1-arg" (func 16))
    (export "bool-arg" (func 17))
    (export "bool-result" (func 18))
    (export "option-arg" (func 19))
  )
  (core instance (;2;) (instantiate 0
      (with "variants" (instance 1))
    )
  )
  (alias core export 2 "memory" (core memory (;0;)))
  (alias core export 2 "cabi_realloc" (core func (;20;)))
  (alias core export 0 "$imports" (core table (;0;)))
  (alias export 0 "u1-result" (func (;6;)))
  (core func (;21;) (canon lower (func 6) (memory 0)))
  (alias export 0 "v1-arg" (func (;7;)))
  (core func (;22;) (canon lower (func 7) (memory 0) string-encoding=utf8))
  (alias export 0 "v1-result" (func (;8;)))
  (core func (;23;) (canon lower (func 8) (memory 0) (realloc 20) string-encoding=utf8))
  (alias export 0 "option-result" (func (;9;)))
  (core func (;24;) (canon lower (func 9) (memory 0)))
  (alias export 0 "casts" (func (;10;)))
  (core func (;25;) (canon lower (func 10) (memory 0)))
  (alias export 0 "expected-arg" (func (;11;)))
  (core func (;26;) (canon lower (func 11) (memory 0) string-encoding=utf8))
  (alias export 0 "expected-result" (func (;12;)))
  (core func (;27;) (canon lower (func 12) (memory 0) (realloc 20) string-encoding=utf8))
  (alias export 0 "return-expected-sugar" (func (;13;)))
  (core func (;28;) (canon lower (func 13) (memory 0)))
  (alias export 0 "return-expected-sugar2" (func (;14;)))
  (core func (;29;) (canon lower (func 14) (memory 0)))
  (alias export 0 "return-expected-sugar3" (func (;15;)))
  (core func (;30;) (canon lower (func 15) (memory 0)))
  (alias export 0 "return-expected-sugar4" (func (;16;)))
  (core func (;31;) (canon lower (func 16) (memory 0)))
  (alias export 0 "return-option-sugar" (func (;17;)))
  (core func (;32;) (canon lower (func 17) (memory 0)))
  (alias export 0 "return-option-sugar2" (func (;18;)))
  (core func (;33;) (canon lower (func 18) (memory 0)))
  (alias export 0 "expected-simple" (func (;19;)))
  (core func (;34;) (canon lower (func 19) (memory 0)))
  (core instance (;3;)
    (export "$imports" (table 0))
    (export "0" (func 21))
    (export "1" (func 22))
    (export "2" (func 23))
    (export "3" (func 24))
    (export "4" (func 25))
    (export "5" (func 26))
    (export "6" (func 27))
    (export "7" (func 28))
    (export "8" (func 29))
    (export "9" (func 30))
    (export "10" (func 31))
    (export "11" (func 32))
    (export "12" (func 33))
    (export "13" (func 34))
  )
  (core instance (;4;) (instantiate 2
      (with "" (instance 3))
    )
  )
)