package wasmtime

  1. Overview
  2. Docs

Source file wasmtime_generated.ml

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
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
module CI = Cstubs_internals

external caml__1_wasm_byte_vec_new
  : _ CI.fatptr -> Unsigned.size_t -> _ CI.fatptr -> unit
  = "caml__1_wasm_byte_vec_new" 

external caml__2_wasm_byte_vec_new_uninitialized
  : _ CI.fatptr -> Unsigned.size_t -> unit
  = "caml__2_wasm_byte_vec_new_uninitialized" 

external caml__3_wasm_byte_vec_copy : _ CI.fatptr -> _ CI.fatptr -> unit
  = "caml__3_wasm_byte_vec_copy" 

external caml__4_wasm_byte_vec_delete : _ CI.fatptr -> unit
  = "caml__4_wasm_byte_vec_delete" 

external caml__5_wasm_engine_new : unit -> CI.voidp
  = "caml__5_wasm_engine_new" 

external caml__6_wasm_engine_delete : _ CI.fatptr -> unit
  = "caml__6_wasm_engine_delete" 

external caml__7_wasm_store_new : _ CI.fatptr -> CI.voidp
  = "caml__7_wasm_store_new" 

external caml__8_wasm_store_delete : _ CI.fatptr -> unit
  = "caml__8_wasm_store_delete" 

external caml__9_wasm_trap_new : _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__9_wasm_trap_new" 

external caml__10_wasm_trap_message : _ CI.fatptr -> _ CI.fatptr -> unit
  = "caml__10_wasm_trap_message" 

external caml__11_wasm_trap_delete : _ CI.fatptr -> unit
  = "caml__11_wasm_trap_delete" 

external caml__12_wasm_val_delete : _ CI.fatptr -> unit
  = "caml__12_wasm_val_delete" 

external caml__13_wasm_val_vec_delete : _ CI.fatptr -> unit
  = "caml__13_wasm_val_vec_delete" 

external caml__14_wasm_memory_data : _ CI.fatptr -> CI.voidp
  = "caml__14_wasm_memory_data" 

external caml__15_wasm_memory_grow : _ CI.fatptr -> Unsigned.uint32 -> bool
  = "caml__15_wasm_memory_grow" 

external caml__16_wasm_memory_size : _ CI.fatptr -> Unsigned.size_t
  = "caml__16_wasm_memory_size" 

external caml__17_wasm_memory_data_size : _ CI.fatptr -> Unsigned.size_t
  = "caml__17_wasm_memory_data_size" 

external caml__18_wasm_memory_delete : _ CI.fatptr -> unit
  = "caml__18_wasm_memory_delete" 

external caml__19_wasm_functype_new_0_0 : unit -> CI.voidp
  = "caml__19_wasm_functype_new_0_0" 

external caml__20_wasm_functype_delete : _ CI.fatptr -> unit
  = "caml__20_wasm_functype_delete" 

external caml__21_wasm_func_new
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatfunptr -> CI.voidp
  = "caml__21_wasm_func_new" 

external caml__22_wasm_func_delete : _ CI.fatptr -> unit
  = "caml__22_wasm_func_delete" 

external caml__23_wasm_extern_delete : _ CI.fatptr -> unit
  = "caml__23_wasm_extern_delete" 

external caml__24_wasm_extern_as_func : _ CI.fatptr -> CI.voidp
  = "caml__24_wasm_extern_as_func" 

external caml__25_wasm_func_as_extern : _ CI.fatptr -> CI.voidp
  = "caml__25_wasm_func_as_extern" 

external caml__26_wasm_extern_as_memory : _ CI.fatptr -> CI.voidp
  = "caml__26_wasm_extern_as_memory" 

external caml__27_wasm_extern_vec_delete : _ CI.fatptr -> unit
  = "caml__27_wasm_extern_vec_delete" 

external caml__28_wasm_module_delete : _ CI.fatptr -> unit
  = "caml__28_wasm_module_delete" 

external caml__29_wasm_instance_delete : _ CI.fatptr -> unit
  = "caml__29_wasm_instance_delete" 

external caml__30_wasm_instance_new
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__30_wasm_instance_new" 

external caml__31_wasm_instance_exports : _ CI.fatptr -> _ CI.fatptr -> unit
  = "caml__31_wasm_instance_exports" 

external caml__32_wasmtime_error_message : _ CI.fatptr -> _ CI.fatptr -> unit
  = "caml__32_wasmtime_error_message" 

external caml__33_wasmtime_error_delete : _ CI.fatptr -> unit
  = "caml__33_wasmtime_error_delete" 

external caml__34_wasi_config_new : unit -> CI.voidp
  = "caml__34_wasi_config_new" 

external caml__35_wasi_config_delete : _ CI.fatptr -> unit
  = "caml__35_wasi_config_delete" 

external caml__36_wasi_config_inherit_argv : _ CI.fatptr -> unit
  = "caml__36_wasi_config_inherit_argv" 

external caml__37_wasi_config_inherit_env : _ CI.fatptr -> unit
  = "caml__37_wasi_config_inherit_env" 

external caml__38_wasi_config_inherit_stdin : _ CI.fatptr -> unit
  = "caml__38_wasi_config_inherit_stdin" 

external caml__39_wasi_config_inherit_stdout : _ CI.fatptr -> unit
  = "caml__39_wasi_config_inherit_stdout" 

external caml__40_wasi_config_inherit_stderr : _ CI.fatptr -> unit
  = "caml__40_wasi_config_inherit_stderr" 

external caml__41_wasi_config_preopen_dir
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> bool
  = "caml__41_wasi_config_preopen_dir" 

external caml__42_wasi_instance_new
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__42_wasi_instance_new" 

external caml__43_wasi_instance_delete : _ CI.fatptr -> unit
  = "caml__43_wasi_instance_delete" 

external caml__44_wasmtime_linker_new : _ CI.fatptr -> CI.voidp
  = "caml__44_wasmtime_linker_new" 

external caml__45_wasmtime_linker_delete : _ CI.fatptr -> unit
  = "caml__45_wasmtime_linker_delete" 

external caml__46_wasmtime_linker_define_wasi
  : _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__46_wasmtime_linker_define_wasi" 

external caml__47_wasmtime_linker_module
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__47_wasmtime_linker_module" 

external caml__48_wasmtime_linker_get_default
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__48_wasmtime_linker_get_default" 

external caml__49_wasmtime_wat2wasm : _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__49_wasmtime_wat2wasm" 

external caml__50_wasmtime_module_new
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__50_wasmtime_module_new" 

external caml__51_wasmtime_func_call
  : _ CI.fatptr -> _ CI.fatptr -> Unsigned.size_t -> _ CI.fatptr ->
    Unsigned.size_t -> _ CI.fatptr -> CI.voidp
  = "caml__51_wasmtime_func_call_byte6" "caml__51_wasmtime_func_call" 

external caml__52_wasmtime_instance_new
  : _ CI.fatptr -> _ CI.fatptr -> _ CI.fatptr -> Unsigned.size_t ->
    _ CI.fatptr -> _ CI.fatptr -> CI.voidp
  = "caml__52_wasmtime_instance_new_byte6" "caml__52_wasmtime_instance_new" 

type 'a result = 'a
type 'a return = 'a
type 'a fn =
 | Returns  : 'a CI.typ   -> 'a return fn
 | Function : 'a CI.typ * 'b fn  -> ('a -> 'b) fn
let map_result f x = f x
let returning t = Returns t
let (@->) f p = Function (f, p)
let foreign : type a b. string -> (a -> b) fn -> (a -> b) =
  fun name t -> match t, name with
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Pointer _,
           Function
             (CI.Primitive CI.Size_t,
              Function
                (CI.Pointer _,
                 Function (CI.Pointer _, Returns (CI.Pointer x12))))))),
  "wasmtime_instance_new" ->
  (fun x1 x3 x5 x7 x8 x10 ->
    let CI.CPointer x11 = x10 in
    let CI.CPointer x9 = x8 in
    let CI.CPointer x6 = x5 in
    let CI.CPointer x4 = x3 in
    let CI.CPointer x2 = x1 in
    CI.make_ptr x12 (caml__52_wasmtime_instance_new x2 x4 x6 x7 x9 x11))
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Primitive CI.Size_t,
           Function
             (CI.Pointer _,
              Function
                (CI.Primitive CI.Size_t,
                 Function (CI.Pointer _, Returns (CI.Pointer x23))))))),
  "wasmtime_func_call" ->
  (fun x13 x15 x17 x18 x20 x21 ->
    let CI.CPointer x22 = x21 in
    let CI.CPointer x19 = x18 in
    let CI.CPointer x16 = x15 in
    let CI.CPointer x14 = x13 in
    CI.make_ptr x23 (caml__51_wasmtime_func_call x14 x16 x17 x19 x20 x22))
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x30)))),
  "wasmtime_module_new" ->
  (fun x24 x26 x28 ->
    let CI.CPointer x29 = x28 in
    let CI.CPointer x27 = x26 in
    let CI.CPointer x25 = x24 in
    CI.make_ptr x30 (caml__50_wasmtime_module_new x25 x27 x29))
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x35))),
  "wasmtime_wat2wasm" ->
  (fun x31 x33 ->
    let CI.CPointer x34 = x33 in
    let CI.CPointer x32 = x31 in
    CI.make_ptr x35 (caml__49_wasmtime_wat2wasm x32 x34))
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x42)))),
  "wasmtime_linker_get_default" ->
  (fun x36 x38 x40 ->
    let CI.CPointer x41 = x40 in
    let CI.CPointer x39 = x38 in
    let CI.CPointer x37 = x36 in
    CI.make_ptr x42 (caml__48_wasmtime_linker_get_default x37 x39 x41))
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x49)))),
  "wasmtime_linker_module" ->
  (fun x43 x45 x47 ->
    let CI.CPointer x48 = x47 in
    let CI.CPointer x46 = x45 in
    let CI.CPointer x44 = x43 in
    CI.make_ptr x49 (caml__47_wasmtime_linker_module x44 x46 x48))
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x54))),
  "wasmtime_linker_define_wasi" ->
  (fun x50 x52 ->
    let CI.CPointer x53 = x52 in
    let CI.CPointer x51 = x50 in
    CI.make_ptr x54 (caml__46_wasmtime_linker_define_wasi x51 x53))
| Function (CI.Pointer _, Returns CI.Void), "wasmtime_linker_delete" ->
  (fun x55 ->
    let CI.CPointer x56 = x55 in caml__45_wasmtime_linker_delete x56)
| Function (CI.Pointer _, Returns (CI.Pointer x59)), "wasmtime_linker_new" ->
  (fun x57 ->
    let CI.CPointer x58 = x57 in
    CI.make_ptr x59 (caml__44_wasmtime_linker_new x58))
| Function (CI.Pointer _, Returns CI.Void), "wasi_instance_delete" ->
  (fun x60 -> let CI.CPointer x61 = x60 in caml__43_wasi_instance_delete x61)
| Function
    (CI.Pointer _,
     Function
       (CI.View {CI.ty = CI.Pointer _; write = x65; _},
        Function
          (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x72))))),
  "wasi_instance_new" ->
  (fun x62 x64 x68 x70 ->
    let CI.CPointer x71 = x70 in
    let CI.CPointer x69 = x68 in
    let CI.CPointer x67 = x65 x64 in
    let CI.CPointer x63 = x62 in
    let x66 = x67 in
    CI.make_ptr x72 (caml__42_wasi_instance_new x63 x66 x69 x71))
| Function
    (CI.Pointer _,
     Function
       (CI.View {CI.ty = CI.Pointer _; write = x76; _},
        Function
          (CI.View {CI.ty = CI.Pointer _; write = x80; _},
           Returns (CI.Primitive CI.Bool)))),
  "wasi_config_preopen_dir" ->
  (fun x73 x75 x79 ->
    let CI.CPointer x82 = x80 x79 in
    let CI.CPointer x78 = x76 x75 in
    let CI.CPointer x74 = x73 in
    let x77 = x78 in
    let x81 = x82 in caml__41_wasi_config_preopen_dir x74 x77 x81)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_inherit_stderr" ->
  (fun x83 ->
    let CI.CPointer x84 = x83 in caml__40_wasi_config_inherit_stderr x84)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_inherit_stdout" ->
  (fun x85 ->
    let CI.CPointer x86 = x85 in caml__39_wasi_config_inherit_stdout x86)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_inherit_stdin" ->
  (fun x87 ->
    let CI.CPointer x88 = x87 in caml__38_wasi_config_inherit_stdin x88)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_inherit_env" ->
  (fun x89 ->
    let CI.CPointer x90 = x89 in caml__37_wasi_config_inherit_env x90)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_inherit_argv" ->
  (fun x91 ->
    let CI.CPointer x92 = x91 in caml__36_wasi_config_inherit_argv x92)
| Function (CI.Pointer _, Returns CI.Void), "wasi_config_delete" ->
  (fun x93 -> let CI.CPointer x94 = x93 in caml__35_wasi_config_delete x94)
| Function (CI.Void, Returns (CI.Pointer x96)), "wasi_config_new" ->
  (fun x95 -> CI.make_ptr x96 (caml__34_wasi_config_new x95))
| Function (CI.Pointer _, Returns CI.Void), "wasmtime_error_delete" ->
  (fun x97 ->
    let CI.CPointer x98 = x97 in caml__33_wasmtime_error_delete x98)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasmtime_error_message" ->
  (fun x99 x101 ->
    let CI.CPointer x102 = x101 in
    let CI.CPointer x100 = x99 in caml__32_wasmtime_error_message x100 x102)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_instance_exports" ->
  (fun x103 x105 ->
    let CI.CPointer x106 = x105 in
    let CI.CPointer x104 = x103 in caml__31_wasm_instance_exports x104 x106)
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x115))))),
  "wasm_instance_new" ->
  (fun x107 x109 x111 x113 ->
    let CI.CPointer x114 = x113 in
    let CI.CPointer x112 = x111 in
    let CI.CPointer x110 = x109 in
    let CI.CPointer x108 = x107 in
    CI.make_ptr x115 (caml__30_wasm_instance_new x108 x110 x112 x114))
| Function (CI.Pointer _, Returns CI.Void), "wasm_instance_delete" ->
  (fun x116 ->
    let CI.CPointer x117 = x116 in caml__29_wasm_instance_delete x117)
| Function (CI.Pointer _, Returns CI.Void), "wasm_module_delete" ->
  (fun x118 ->
    let CI.CPointer x119 = x118 in caml__28_wasm_module_delete x119)
| Function (CI.Pointer _, Returns CI.Void), "wasm_extern_vec_delete" ->
  (fun x120 ->
    let CI.CPointer x121 = x120 in caml__27_wasm_extern_vec_delete x121)
| Function (CI.Pointer _, Returns (CI.Pointer x124)), "wasm_extern_as_memory" ->
  (fun x122 ->
    let CI.CPointer x123 = x122 in
    CI.make_ptr x124 (caml__26_wasm_extern_as_memory x123))
| Function (CI.Pointer _, Returns (CI.Pointer x127)), "wasm_func_as_extern" ->
  (fun x125 ->
    let CI.CPointer x126 = x125 in
    CI.make_ptr x127 (caml__25_wasm_func_as_extern x126))
| Function (CI.Pointer _, Returns (CI.Pointer x130)), "wasm_extern_as_func" ->
  (fun x128 ->
    let CI.CPointer x129 = x128 in
    CI.make_ptr x130 (caml__24_wasm_extern_as_func x129))
| Function (CI.Pointer _, Returns CI.Void), "wasm_extern_delete" ->
  (fun x131 ->
    let CI.CPointer x132 = x131 in caml__23_wasm_extern_delete x132)
| Function (CI.Pointer _, Returns CI.Void), "wasm_func_delete" ->
  (fun x133 -> let CI.CPointer x134 = x133 in caml__22_wasm_func_delete x134)
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Funptr _, Returns (CI.Pointer x141)))),
  "wasm_func_new" ->
  (fun x135 x137 x139 ->
    let CI.Static_funptr x140 = x139 in
    let CI.CPointer x138 = x137 in
    let CI.CPointer x136 = x135 in
    CI.make_ptr x141 (caml__21_wasm_func_new x136 x138 x140))
| Function (CI.Pointer _, Returns CI.Void), "wasm_functype_delete" ->
  (fun x142 ->
    let CI.CPointer x143 = x142 in caml__20_wasm_functype_delete x143)
| Function (CI.Void, Returns (CI.Pointer x145)), "wasm_functype_new_0_0" ->
  (fun x144 -> CI.make_ptr x145 (caml__19_wasm_functype_new_0_0 x144))
| Function (CI.Pointer _, Returns CI.Void), "wasm_memory_delete" ->
  (fun x146 ->
    let CI.CPointer x147 = x146 in caml__18_wasm_memory_delete x147)
| Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)),
  "wasm_memory_data_size" ->
  (fun x148 ->
    let CI.CPointer x149 = x148 in caml__17_wasm_memory_data_size x149)
| Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)),
  "wasm_memory_size" ->
  (fun x150 -> let CI.CPointer x151 = x150 in caml__16_wasm_memory_size x151)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Uint32_t, Returns (CI.Primitive CI.Bool))),
  "wasm_memory_grow" ->
  (fun x152 x154 ->
    let CI.CPointer x153 = x152 in caml__15_wasm_memory_grow x153 x154)
| Function (CI.Pointer _, Returns (CI.Pointer x157)), "wasm_memory_data" ->
  (fun x155 ->
    let CI.CPointer x156 = x155 in
    CI.make_ptr x157 (caml__14_wasm_memory_data x156))
| Function (CI.Pointer _, Returns CI.Void), "wasm_val_vec_delete" ->
  (fun x158 ->
    let CI.CPointer x159 = x158 in caml__13_wasm_val_vec_delete x159)
| Function (CI.Pointer _, Returns CI.Void), "wasm_val_delete" ->
  (fun x160 -> let CI.CPointer x161 = x160 in caml__12_wasm_val_delete x161)
| Function (CI.Pointer _, Returns CI.Void), "wasm_trap_delete" ->
  (fun x162 -> let CI.CPointer x163 = x162 in caml__11_wasm_trap_delete x163)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_trap_message" ->
  (fun x164 x166 ->
    let CI.CPointer x167 = x166 in
    let CI.CPointer x165 = x164 in caml__10_wasm_trap_message x165 x167)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x172))),
  "wasm_trap_new" ->
  (fun x168 x170 ->
    let CI.CPointer x171 = x170 in
    let CI.CPointer x169 = x168 in
    CI.make_ptr x172 (caml__9_wasm_trap_new x169 x171))
| Function (CI.Pointer _, Returns CI.Void), "wasm_store_delete" ->
  (fun x173 -> let CI.CPointer x174 = x173 in caml__8_wasm_store_delete x174)
| Function (CI.Pointer _, Returns (CI.Pointer x177)), "wasm_store_new" ->
  (fun x175 ->
    let CI.CPointer x176 = x175 in
    CI.make_ptr x177 (caml__7_wasm_store_new x176))
| Function (CI.Pointer _, Returns CI.Void), "wasm_engine_delete" ->
  (fun x178 ->
    let CI.CPointer x179 = x178 in caml__6_wasm_engine_delete x179)
| Function (CI.Void, Returns (CI.Pointer x181)), "wasm_engine_new" ->
  (fun x180 -> CI.make_ptr x181 (caml__5_wasm_engine_new x180))
| Function (CI.Pointer _, Returns CI.Void), "wasm_byte_vec_delete" ->
  (fun x182 ->
    let CI.CPointer x183 = x182 in caml__4_wasm_byte_vec_delete x183)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_byte_vec_copy" ->
  (fun x184 x186 ->
    let CI.CPointer x187 = x186 in
    let CI.CPointer x185 = x184 in caml__3_wasm_byte_vec_copy x185 x187)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_byte_vec_new_uninitialized" ->
  (fun x188 x190 ->
    let CI.CPointer x189 = x188 in
    caml__2_wasm_byte_vec_new_uninitialized x189 x190)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t,
        Function
          (CI.View {CI.ty = CI.Pointer _; write = x195; _}, Returns CI.Void))),
  "wasm_byte_vec_new" ->
  (fun x191 x193 x194 ->
    let CI.CPointer x197 = x195 x194 in
    let CI.CPointer x192 = x191 in
    let x196 = x197 in caml__1_wasm_byte_vec_new x192 x193 x196)
| _, s ->  Printf.ksprintf failwith "No match for %s" s


let foreign_value : type a. string -> a Ctypes.typ -> a Ctypes.ptr =
  fun name t -> match t, name with
| _, s ->  Printf.ksprintf failwith "No match for %s" s