package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file wasmer__c_generated_functions__Api_funcs_desc__Functions.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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
module CI = Cstubs_internals

external wasmer_stubs_1_wasmer_is_compiler_available
  : Unsigned.uint32 -> bool = "wasmer_stubs_1_wasmer_is_compiler_available" 

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

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

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

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

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

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

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

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

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

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

external wasmer_stubs_12_wasmer_last_error_length : unit -> int
  = "wasmer_stubs_12_wasmer_last_error_length" 

external wasmer_stubs_13_wasmer_last_error_message
  : _ CI.fatptr -> int -> int = "wasmer_stubs_13_wasmer_last_error_message" 

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

external wasmer_stubs_15_wasm_config_set_compiler
  : _ CI.fatptr -> Unsigned.uint32 -> unit
  = "wasmer_stubs_15_wasm_config_set_compiler" 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

external wasmer_stubs_33_wasm_valtype_new : Unsigned.uint8 -> CI.voidp
  = "wasmer_stubs_33_wasm_valtype_new" 

external wasmer_stubs_34_wasm_valtype_kind : _ CI.fatptr -> Unsigned.uint8
  = "wasmer_stubs_34_wasm_valtype_kind" 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

external wasmer_stubs_67_wasm_externtype_kind : _ CI.fatptr -> Unsigned.uint8
  = "wasmer_stubs_67_wasm_externtype_kind" 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 _, Returns CI.Void)),
  "wat2wasm" ->
  (fun x1 x3 ->
    let CI.CPointer x4 = x3 in
    let CI.CPointer x2 = x1 in wasmer_stubs_82_wat2wasm x2 x4)
| Function (CI.Pointer _, Returns CI.Void), "wasm_exporttype_vec_delete" ->
  (fun x5 ->
    let CI.CPointer x6 = x5 in wasmer_stubs_81_wasm_exporttype_vec_delete x6)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_exporttype_vec_new_uninitialized" ->
  (fun x7 x9 ->
    let CI.CPointer x8 = x7 in
    wasmer_stubs_80_wasm_exporttype_vec_new_uninitialized x8 x9)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t, Function (CI.Pointer _, Returns CI.Void))),
  "wasm_exporttype_vec_new" ->
  (fun x10 x12 x13 ->
    let CI.CPointer x14 = x13 in
    let CI.CPointer x11 = x10 in
    wasmer_stubs_79_wasm_exporttype_vec_new x11 x12 x14)
| Function (CI.Pointer _, Returns CI.Void), "wasm_exporttype_vec_new_empty" ->
  (fun x15 ->
    let CI.CPointer x16 = x15 in
    wasmer_stubs_78_wasm_exporttype_vec_new_empty x16)
| Function (CI.Pointer _, Returns CI.Void), "wasm_exporttype_delete" ->
  (fun x17 ->
    let CI.CPointer x18 = x17 in wasmer_stubs_77_wasm_exporttype_delete x18)
| Function (CI.Pointer _, Returns (CI.Pointer x21)), "wasm_exporttype_type" ->
  (fun x19 ->
    let CI.CPointer x20 = x19 in
    CI.make_ptr x21 (wasmer_stubs_76_wasm_exporttype_type x20))
| Function (CI.Pointer _, Returns (CI.Pointer x24)), "wasm_exporttype_name" ->
  (fun x22 ->
    let CI.CPointer x23 = x22 in
    CI.make_ptr x24 (wasmer_stubs_75_wasm_exporttype_name x23))
| Function (CI.Pointer _, Returns CI.Void), "wasm_importtype_vec_delete" ->
  (fun x25 ->
    let CI.CPointer x26 = x25 in
    wasmer_stubs_74_wasm_importtype_vec_delete x26)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_importtype_vec_new_uninitialized" ->
  (fun x27 x29 ->
    let CI.CPointer x28 = x27 in
    wasmer_stubs_73_wasm_importtype_vec_new_uninitialized x28 x29)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t, Function (CI.Pointer _, Returns CI.Void))),
  "wasm_importtype_vec_new" ->
  (fun x30 x32 x33 ->
    let CI.CPointer x34 = x33 in
    let CI.CPointer x31 = x30 in
    wasmer_stubs_72_wasm_importtype_vec_new x31 x32 x34)
| Function (CI.Pointer _, Returns CI.Void), "wasm_importtype_vec_new_empty" ->
  (fun x35 ->
    let CI.CPointer x36 = x35 in
    wasmer_stubs_71_wasm_importtype_vec_new_empty x36)
| Function (CI.Pointer _, Returns (CI.Pointer x39)), "wasm_importtype_type" ->
  (fun x37 ->
    let CI.CPointer x38 = x37 in
    CI.make_ptr x39 (wasmer_stubs_70_wasm_importtype_type x38))
| Function (CI.Pointer _, Returns (CI.Pointer x42)), "wasm_importtype_name" ->
  (fun x40 ->
    let CI.CPointer x41 = x40 in
    CI.make_ptr x42 (wasmer_stubs_69_wasm_importtype_name x41))
| Function (CI.Pointer _, Returns (CI.Pointer x45)), "wasm_importtype_module" ->
  (fun x43 ->
    let CI.CPointer x44 = x43 in
    CI.make_ptr x45 (wasmer_stubs_68_wasm_importtype_module x44))
| Function (CI.Pointer _, Returns (CI.Primitive CI.Uint8_t)),
  "wasm_externtype_kind" ->
  (fun x46 ->
    let CI.CPointer x47 = x46 in wasmer_stubs_67_wasm_externtype_kind x47)
| Function (CI.Pointer _, Returns CI.Void), "wasm_trap_delete" ->
  (fun x48 ->
    let CI.CPointer x49 = x48 in wasmer_stubs_66_wasm_trap_delete x49)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_trap_message" ->
  (fun x50 x52 ->
    let CI.CPointer x53 = x52 in
    let CI.CPointer x51 = x50 in wasmer_stubs_65_wasm_trap_message x51 x53)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x58))),
  "wasm_trap_new" ->
  (fun x54 x56 ->
    let CI.CPointer x57 = x56 in
    let CI.CPointer x55 = x54 in
    CI.make_ptr x58 (wasmer_stubs_64_wasm_trap_new x55 x57))
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_instance_exports" ->
  (fun x59 x61 ->
    let CI.CPointer x62 = x61 in
    let CI.CPointer x60 = x59 in
    wasmer_stubs_63_wasm_instance_exports x60 x62)
| Function (CI.Pointer _, Returns CI.Void), "wasm_instance_delete" ->
  (fun x63 ->
    let CI.CPointer x64 = x63 in wasmer_stubs_62_wasm_instance_delete x64)
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _,
        Function
          (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x73))))),
  "wasm_instance_new" ->
  (fun x65 x67 x69 x71 ->
    let CI.CPointer x72 = x71 in
    let CI.CPointer x70 = x69 in
    let CI.CPointer x68 = x67 in
    let CI.CPointer x66 = x65 in
    CI.make_ptr x73 (wasmer_stubs_61_wasm_instance_new x66 x68 x70 x72))
| Function (CI.Pointer _, Returns CI.Void), "wasm_memorytype_delete" ->
  (fun x74 ->
    let CI.CPointer x75 = x74 in wasmer_stubs_60_wasm_memorytype_delete x75)
| Function (CI.Pointer _, Returns (CI.Pointer x78)), "wasm_memorytype_limits" ->
  (fun x76 ->
    let CI.CPointer x77 = x76 in
    CI.make_ptr x78 (wasmer_stubs_59_wasm_memorytype_limits x77))
| Function (CI.Pointer _, Returns (CI.Pointer x81)), "wasm_memory_type" ->
  (fun x79 ->
    let CI.CPointer x80 = x79 in
    CI.make_ptr x81 (wasmer_stubs_58_wasm_memory_type x80))
| Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)),
  "wasm_memory_data_size" ->
  (fun x82 ->
    let CI.CPointer x83 = x82 in wasmer_stubs_57_wasm_memory_data_size x83)
| Function (CI.Pointer _, Returns (CI.Pointer x86)), "wasm_memory_data" ->
  (fun x84 ->
    let CI.CPointer x85 = x84 in
    CI.make_ptr x86 (wasmer_stubs_56_wasm_memory_data x85))
| Function (CI.Pointer _, Returns (CI.Pointer x89)), "wasm_func_type" ->
  (fun x87 ->
    let CI.CPointer x88 = x87 in
    CI.make_ptr x89 (wasmer_stubs_55_wasm_func_type x88))
| Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)),
  "wasm_func_result_arity" ->
  (fun x90 ->
    let CI.CPointer x91 = x90 in wasmer_stubs_54_wasm_func_result_arity x91)
| Function (CI.Pointer _, Returns (CI.Primitive CI.Size_t)),
  "wasm_func_param_arity" ->
  (fun x92 ->
    let CI.CPointer x93 = x92 in wasmer_stubs_53_wasm_func_param_arity x93)
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x100)))),
  "wasm_func_call" ->
  (fun x94 x96 x98 ->
    let CI.CPointer x99 = x98 in
    let CI.CPointer x97 = x96 in
    let CI.CPointer x95 = x94 in
    CI.make_ptr x100 (wasmer_stubs_52_wasm_func_call x95 x97 x99))
| Function (CI.Pointer _, Returns (CI.Pointer x103)), "wasm_func_as_extern" ->
  (fun x101 ->
    let CI.CPointer x102 = x101 in
    CI.make_ptr x103 (wasmer_stubs_51_wasm_func_as_extern x102))
| Function
    (CI.Pointer _,
     Function
       (CI.Pointer _, Function (CI.Funptr _, Returns (CI.Pointer x110)))),
  "wasm_func_new" ->
  (fun x104 x106 x108 ->
    let CI.Static_funptr x109 = x108 in
    let CI.CPointer x107 = x106 in
    let CI.CPointer x105 = x104 in
    CI.make_ptr x110 (wasmer_stubs_50_wasm_func_new x105 x107 x109))
| Function (CI.Pointer _, Returns CI.Void), "wasm_functype_delete" ->
  (fun x111 ->
    let CI.CPointer x112 = x111 in wasmer_stubs_49_wasm_functype_delete x112)
| Function (CI.Pointer _, Returns (CI.Pointer x115)), "wasm_functype_results" ->
  (fun x113 ->
    let CI.CPointer x114 = x113 in
    CI.make_ptr x115 (wasmer_stubs_48_wasm_functype_results x114))
| Function (CI.Pointer _, Returns (CI.Pointer x118)), "wasm_functype_params" ->
  (fun x116 ->
    let CI.CPointer x117 = x116 in
    CI.make_ptr x118 (wasmer_stubs_47_wasm_functype_params x117))
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x123))),
  "wasm_functype_new" ->
  (fun x119 x121 ->
    let CI.CPointer x122 = x121 in
    let CI.CPointer x120 = x119 in
    CI.make_ptr x123 (wasmer_stubs_46_wasm_functype_new x120 x122))
| Function (CI.Pointer _, Returns CI.Void), "wasm_extern_vec_delete" ->
  (fun x124 ->
    let CI.CPointer x125 = x124 in
    wasmer_stubs_45_wasm_extern_vec_delete x125)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_extern_vec_new_uninitialized" ->
  (fun x126 x128 ->
    let CI.CPointer x127 = x126 in
    wasmer_stubs_44_wasm_extern_vec_new_uninitialized x127 x128)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t, Function (CI.Pointer _, Returns CI.Void))),
  "wasm_extern_vec_new" ->
  (fun x129 x131 x132 ->
    let CI.CPointer x133 = x132 in
    let CI.CPointer x130 = x129 in
    wasmer_stubs_43_wasm_extern_vec_new x130 x131 x133)
| Function (CI.Pointer _, Returns CI.Void), "wasm_extern_vec_new_empty" ->
  (fun x134 ->
    let CI.CPointer x135 = x134 in
    wasmer_stubs_42_wasm_extern_vec_new_empty x135)
| Function (CI.Pointer _, Returns CI.Void), "wasm_extern_delete" ->
  (fun x136 ->
    let CI.CPointer x137 = x136 in wasmer_stubs_41_wasm_extern_delete x137)
| Function (CI.Pointer _, Returns (CI.Pointer x140)), "wasm_extern_as_memory" ->
  (fun x138 ->
    let CI.CPointer x139 = x138 in
    CI.make_ptr x140 (wasmer_stubs_40_wasm_extern_as_memory x139))
| Function (CI.Pointer _, Returns (CI.Pointer x143)), "wasm_extern_as_func" ->
  (fun x141 ->
    let CI.CPointer x142 = x141 in
    CI.make_ptr x143 (wasmer_stubs_39_wasm_extern_as_func x142))
| Function (CI.Pointer _, Returns CI.Void), "wasm_valtype_vec_delete" ->
  (fun x144 ->
    let CI.CPointer x145 = x144 in
    wasmer_stubs_38_wasm_valtype_vec_delete x145)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_valtype_vec_new_uninitialized" ->
  (fun x146 x148 ->
    let CI.CPointer x147 = x146 in
    wasmer_stubs_37_wasm_valtype_vec_new_uninitialized x147 x148)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t, Function (CI.Pointer _, Returns CI.Void))),
  "wasm_valtype_vec_new" ->
  (fun x149 x151 x152 ->
    let CI.CPointer x153 = x152 in
    let CI.CPointer x150 = x149 in
    wasmer_stubs_36_wasm_valtype_vec_new x150 x151 x153)
| Function (CI.Pointer _, Returns CI.Void), "wasm_valtype_vec_new_empty" ->
  (fun x154 ->
    let CI.CPointer x155 = x154 in
    wasmer_stubs_35_wasm_valtype_vec_new_empty x155)
| Function (CI.Pointer _, Returns (CI.Primitive CI.Uint8_t)),
  "wasm_valtype_kind" ->
  (fun x156 ->
    let CI.CPointer x157 = x156 in wasmer_stubs_34_wasm_valtype_kind x157)
| Function (CI.Primitive CI.Uint8_t, Returns (CI.Pointer x159)),
  "wasm_valtype_new" ->
  (fun x158 -> CI.make_ptr x159 (wasmer_stubs_33_wasm_valtype_new x158))
| Function (CI.Pointer _, Returns CI.Void), "wasm_val_vec_delete" ->
  (fun x160 ->
    let CI.CPointer x161 = x160 in wasmer_stubs_32_wasm_val_vec_delete x161)
| Function (CI.Pointer _, Function (CI.Primitive CI.Size_t, Returns CI.Void)),
  "wasm_val_vec_new_uninitialized" ->
  (fun x162 x164 ->
    let CI.CPointer x163 = x162 in
    wasmer_stubs_31_wasm_val_vec_new_uninitialized x163 x164)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t, Function (CI.Pointer _, Returns CI.Void))),
  "wasm_val_vec_new" ->
  (fun x165 x167 x168 ->
    let CI.CPointer x169 = x168 in
    let CI.CPointer x166 = x165 in
    wasmer_stubs_30_wasm_val_vec_new x166 x167 x169)
| Function (CI.Pointer _, Returns CI.Void), "wasm_val_vec_new_empty" ->
  (fun x170 ->
    let CI.CPointer x171 = x170 in
    wasmer_stubs_29_wasm_val_vec_new_empty x171)
| Function (CI.Pointer _, Returns CI.Void), "wasm_byte_vec_delete" ->
  (fun x172 ->
    let CI.CPointer x173 = x172 in wasmer_stubs_28_wasm_byte_vec_delete x173)
| Function (CI.Pointer _, Returns CI.Void), "wasm_byte_vec_new_empty" ->
  (fun x174 ->
    let CI.CPointer x175 = x174 in
    wasmer_stubs_27_wasm_byte_vec_new_empty x175)
| Function
    (CI.Pointer _,
     Function
       (CI.Primitive CI.Size_t,
        Function
          (CI.View {CI.ty = CI.Pointer _; write = x180; _}, Returns CI.Void))),
  "wasm_byte_vec_new" ->
  (fun x176 x178 x179 ->
    let CI.CPointer x182 = x180 x179 in
    let CI.CPointer x177 = x176 in
    let x181 = x182 in wasmer_stubs_26_wasm_byte_vec_new x177 x178 x181)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_module_exports" ->
  (fun x183 x185 ->
    let CI.CPointer x186 = x185 in
    let CI.CPointer x184 = x183 in
    wasmer_stubs_25_wasm_module_exports x184 x186)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_module_imports" ->
  (fun x187 x189 ->
    let CI.CPointer x190 = x189 in
    let CI.CPointer x188 = x187 in
    wasmer_stubs_24_wasm_module_imports x188 x190)
| Function (CI.Pointer _, Returns CI.Void), "wasm_module_delete" ->
  (fun x191 ->
    let CI.CPointer x192 = x191 in wasmer_stubs_23_wasm_module_delete x192)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns (CI.Pointer x197))),
  "wasm_module_new" ->
  (fun x193 x195 ->
    let CI.CPointer x196 = x195 in
    let CI.CPointer x194 = x193 in
    CI.make_ptr x197 (wasmer_stubs_22_wasm_module_new x194 x196))
| Function (CI.Pointer _, Returns CI.Void), "wasm_store_delete" ->
  (fun x198 ->
    let CI.CPointer x199 = x198 in wasmer_stubs_21_wasm_store_delete x199)
| Function (CI.Pointer _, Returns (CI.Pointer x202)), "wasm_store_new" ->
  (fun x200 ->
    let CI.CPointer x201 = x200 in
    CI.make_ptr x202 (wasmer_stubs_20_wasm_store_new x201))
| Function (CI.Pointer _, Returns CI.Void), "wasm_engine_delete" ->
  (fun x203 ->
    let CI.CPointer x204 = x203 in wasmer_stubs_19_wasm_engine_delete x204)
| Function (CI.Pointer _, Returns (CI.Pointer x207)),
  "wasm_engine_new_with_config" ->
  (fun x205 ->
    let CI.CPointer x206 = x205 in
    CI.make_ptr x207 (wasmer_stubs_18_wasm_engine_new_with_config x206))
| Function (CI.Pointer _, Returns CI.Void), "wasm_config_delete" ->
  (fun x208 ->
    let CI.CPointer x209 = x208 in wasmer_stubs_17_wasm_config_delete x209)
| Function (CI.Pointer _, Function (CI.Pointer _, Returns CI.Void)),
  "wasm_config_set_features" ->
  (fun x210 x212 ->
    let CI.CPointer x213 = x212 in
    let CI.CPointer x211 = x210 in
    wasmer_stubs_16_wasm_config_set_features x211 x213)
| Function
    (CI.Pointer _,
     Function
       (CI.View {CI.ty = CI.Primitive CI.Uint32_t; write = x217; _},
        Returns CI.Void)),
  "wasm_config_set_compiler" ->
  (fun x214 x216 ->
    let CI.CPointer x215 = x214 in
    let x218 = x217 x216 in
    wasmer_stubs_15_wasm_config_set_compiler x215 x218)
| Function (CI.Void, Returns (CI.Pointer x220)), "wasm_config_new" ->
  (fun x219 -> CI.make_ptr x220 (wasmer_stubs_14_wasm_config_new x219))
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Int, Returns (CI.Primitive CI.Int))),
  "wasmer_last_error_message" ->
  (fun x221 x223 ->
    let CI.CPointer x222 = x221 in
    wasmer_stubs_13_wasmer_last_error_message x222 x223)
| Function (CI.Void, Returns (CI.Primitive CI.Int)),
  "wasmer_last_error_length" -> wasmer_stubs_12_wasmer_last_error_length
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_threads" ->
  (fun x225 x227 ->
    let CI.CPointer x226 = x225 in
    wasmer_stubs_11_wasmer_features_threads x226 x227)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_tail_call" ->
  (fun x228 x230 ->
    let CI.CPointer x229 = x228 in
    wasmer_stubs_10_wasmer_features_tail_call x229 x230)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_simd" ->
  (fun x231 x233 ->
    let CI.CPointer x232 = x231 in
    wasmer_stubs_9_wasmer_features_simd x232 x233)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_reference_types" ->
  (fun x234 x236 ->
    let CI.CPointer x235 = x234 in
    wasmer_stubs_8_wasmer_features_reference_types x235 x236)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_multi_value" ->
  (fun x237 x239 ->
    let CI.CPointer x238 = x237 in
    wasmer_stubs_7_wasmer_features_multi_value x238 x239)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_multi_memory" ->
  (fun x240 x242 ->
    let CI.CPointer x241 = x240 in
    wasmer_stubs_6_wasmer_features_multi_memory x241 x242)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_module_linking" ->
  (fun x243 x245 ->
    let CI.CPointer x244 = x243 in
    wasmer_stubs_5_wasmer_features_module_linking x244 x245)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_memory64" ->
  (fun x246 x248 ->
    let CI.CPointer x247 = x246 in
    wasmer_stubs_4_wasmer_features_memory64 x247 x248)
| Function
    (CI.Pointer _,
     Function (CI.Primitive CI.Bool, Returns (CI.Primitive CI.Bool))),
  "wasmer_features_bulk_memory" ->
  (fun x249 x251 ->
    let CI.CPointer x250 = x249 in
    wasmer_stubs_3_wasmer_features_bulk_memory x250 x251)
| Function (CI.Void, Returns (CI.Pointer x253)), "wasmer_features_new" ->
  (fun x252 -> CI.make_ptr x253 (wasmer_stubs_2_wasmer_features_new x252))
| Function
    (CI.View {CI.ty = CI.Primitive CI.Uint32_t; write = x255; _},
     Returns (CI.Primitive CI.Bool)),
  "wasmer_is_compiler_available" ->
  (fun x254 ->
    let x256 = x255 x254 in wasmer_stubs_1_wasmer_is_compiler_available x256)
| _, 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

OCaml

Innovation. Community. Security.