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
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
/* automatically generated by rust-bindgen 0.56.0 */

pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 31;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const __TIMESIZE: u32 = 64;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
    pub __val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
    assert_eq!(
        ::std::mem::size_of::<__fsid_t>(),
        8usize,
        concat!("Size of: ", stringify!(__fsid_t))
    );
    assert_eq!(
        ::std::mem::align_of::<__fsid_t>(),
        4usize,
        concat!("Alignment of ", stringify!(__fsid_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(__fsid_t),
            "::",
            stringify!(__val)
        )
    );
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct NativeSymbol {
    pub symbol: *const ::std::os::raw::c_char,
    pub func_ptr: *mut ::std::os::raw::c_void,
    pub signature: *const ::std::os::raw::c_char,
    pub attachment: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_NativeSymbol() {
    assert_eq!(
        ::std::mem::size_of::<NativeSymbol>(),
        32usize,
        concat!("Size of: ", stringify!(NativeSymbol))
    );
    assert_eq!(
        ::std::mem::align_of::<NativeSymbol>(),
        8usize,
        concat!("Alignment of ", stringify!(NativeSymbol))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<NativeSymbol>())).symbol as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(NativeSymbol),
            "::",
            stringify!(symbol)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<NativeSymbol>())).func_ptr as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(NativeSymbol),
            "::",
            stringify!(func_ptr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<NativeSymbol>())).signature as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(NativeSymbol),
            "::",
            stringify!(signature)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<NativeSymbol>())).attachment as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(NativeSymbol),
            "::",
            stringify!(attachment)
        )
    );
}
extern "C" {
    #[doc = " Get the exported APIs of base lib"]
    #[doc = ""]
    #[doc = " @param p_base_lib_apis return the exported API array of base lib"]
    #[doc = ""]
    #[doc = " @return the number of the exported API"]
    pub fn get_base_lib_export_apis(p_base_lib_apis: *mut *mut NativeSymbol) -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WASMModuleCommon {
    _unused: [u8; 0],
}
pub type wasm_module_t = *mut WASMModuleCommon;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WASMModuleInstanceCommon {
    _unused: [u8; 0],
}
pub type wasm_module_inst_t = *mut WASMModuleInstanceCommon;
pub type WASMFunctionInstanceCommon = ::std::os::raw::c_void;
pub type wasm_function_inst_t = *mut WASMFunctionInstanceCommon;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct wasm_section_t {
    pub next: *mut wasm_section_t,
    pub section_type: ::std::os::raw::c_int,
    pub section_body: *mut u8,
    pub section_body_size: u32,
}
#[test]
fn bindgen_test_layout_wasm_section_t() {
    assert_eq!(
        ::std::mem::size_of::<wasm_section_t>(),
        32usize,
        concat!("Size of: ", stringify!(wasm_section_t))
    );
    assert_eq!(
        ::std::mem::align_of::<wasm_section_t>(),
        8usize,
        concat!("Alignment of ", stringify!(wasm_section_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_section_t>())).next as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_section_t),
            "::",
            stringify!(next)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_section_t>())).section_type as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_section_t),
            "::",
            stringify!(section_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_section_t>())).section_body as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_section_t),
            "::",
            stringify!(section_body)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<wasm_section_t>())).section_body_size as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_section_t),
            "::",
            stringify!(section_body_size)
        )
    );
}
pub type aot_section_t = wasm_section_t;
pub type wasm_section_list_t = *mut wasm_section_t;
pub type aot_section_list_t = *mut wasm_section_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WASMExecEnv {
    _unused: [u8; 0],
}
pub type wasm_exec_env_t = *mut WASMExecEnv;
pub const package_type_t_Wasm_Module_Bytecode: package_type_t = 0;
pub const package_type_t_Wasm_Module_AoT: package_type_t = 1;
pub const package_type_t_Package_Type_Unknown: package_type_t = 65535;
pub type package_type_t = ::std::os::raw::c_uint;
pub const mem_alloc_type_t_Alloc_With_Pool: mem_alloc_type_t = 0;
pub const mem_alloc_type_t_Alloc_With_Allocator: mem_alloc_type_t = 1;
pub const mem_alloc_type_t_Alloc_With_System_Allocator: mem_alloc_type_t = 2;
pub type mem_alloc_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union MemAllocOption {
    pub pool: MemAllocOption__bindgen_ty_1,
    pub allocator: MemAllocOption__bindgen_ty_2,
    _bindgen_union_align: [u64; 3usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MemAllocOption__bindgen_ty_1 {
    pub heap_buf: *mut ::std::os::raw::c_void,
    pub heap_size: u32,
}
#[test]
fn bindgen_test_layout_MemAllocOption__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<MemAllocOption__bindgen_ty_1>(),
        16usize,
        concat!("Size of: ", stringify!(MemAllocOption__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<MemAllocOption__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(MemAllocOption__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<MemAllocOption__bindgen_ty_1>())).heap_buf as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption__bindgen_ty_1),
            "::",
            stringify!(heap_buf)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<MemAllocOption__bindgen_ty_1>())).heap_size as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption__bindgen_ty_1),
            "::",
            stringify!(heap_size)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MemAllocOption__bindgen_ty_2 {
    pub malloc_func: *mut ::std::os::raw::c_void,
    pub realloc_func: *mut ::std::os::raw::c_void,
    pub free_func: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_MemAllocOption__bindgen_ty_2() {
    assert_eq!(
        ::std::mem::size_of::<MemAllocOption__bindgen_ty_2>(),
        24usize,
        concat!("Size of: ", stringify!(MemAllocOption__bindgen_ty_2))
    );
    assert_eq!(
        ::std::mem::align_of::<MemAllocOption__bindgen_ty_2>(),
        8usize,
        concat!("Alignment of ", stringify!(MemAllocOption__bindgen_ty_2))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<MemAllocOption__bindgen_ty_2>())).malloc_func as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption__bindgen_ty_2),
            "::",
            stringify!(malloc_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<MemAllocOption__bindgen_ty_2>())).realloc_func as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption__bindgen_ty_2),
            "::",
            stringify!(realloc_func)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<MemAllocOption__bindgen_ty_2>())).free_func as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption__bindgen_ty_2),
            "::",
            stringify!(free_func)
        )
    );
}
#[test]
fn bindgen_test_layout_MemAllocOption() {
    assert_eq!(
        ::std::mem::size_of::<MemAllocOption>(),
        24usize,
        concat!("Size of: ", stringify!(MemAllocOption))
    );
    assert_eq!(
        ::std::mem::align_of::<MemAllocOption>(),
        8usize,
        concat!("Alignment of ", stringify!(MemAllocOption))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<MemAllocOption>())).pool as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption),
            "::",
            stringify!(pool)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<MemAllocOption>())).allocator as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(MemAllocOption),
            "::",
            stringify!(allocator)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RuntimeInitArgs {
    pub mem_alloc_type: mem_alloc_type_t,
    pub mem_alloc_option: MemAllocOption,
    pub native_module_name: *const ::std::os::raw::c_char,
    pub native_symbols: *mut NativeSymbol,
    pub n_native_symbols: u32,
    pub max_thread_num: u32,
}
#[test]
fn bindgen_test_layout_RuntimeInitArgs() {
    assert_eq!(
        ::std::mem::size_of::<RuntimeInitArgs>(),
        56usize,
        concat!("Size of: ", stringify!(RuntimeInitArgs))
    );
    assert_eq!(
        ::std::mem::align_of::<RuntimeInitArgs>(),
        8usize,
        concat!("Alignment of ", stringify!(RuntimeInitArgs))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<RuntimeInitArgs>())).mem_alloc_type as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(mem_alloc_type)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<RuntimeInitArgs>())).mem_alloc_option as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(mem_alloc_option)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<RuntimeInitArgs>())).native_module_name as *const _ as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(native_module_name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<RuntimeInitArgs>())).native_symbols as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(native_symbols)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<RuntimeInitArgs>())).n_native_symbols as *const _ as usize
        },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(n_native_symbols)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<RuntimeInitArgs>())).max_thread_num as *const _ as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(RuntimeInitArgs),
            "::",
            stringify!(max_thread_num)
        )
    );
}
pub type wasm_valkind_t = u8;
pub const wasm_valkind_enum_WASM_I32: wasm_valkind_enum = 0;
pub const wasm_valkind_enum_WASM_I64: wasm_valkind_enum = 1;
pub const wasm_valkind_enum_WASM_F32: wasm_valkind_enum = 2;
pub const wasm_valkind_enum_WASM_F64: wasm_valkind_enum = 3;
pub const wasm_valkind_enum_WASM_ANYREF: wasm_valkind_enum = 128;
pub const wasm_valkind_enum_WASM_FUNCREF: wasm_valkind_enum = 129;
pub type wasm_valkind_enum = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct wasm_ref_t {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct wasm_val_t {
    pub kind: wasm_valkind_t,
    pub of: wasm_val_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union wasm_val_t__bindgen_ty_1 {
    pub i32_: i32,
    pub i64_: i64,
    pub f32_: f32,
    pub f64_: f64,
    pub ref_: *mut wasm_ref_t,
    _bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_wasm_val_t__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<wasm_val_t__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(wasm_val_t__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<wasm_val_t__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(wasm_val_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t__bindgen_ty_1>())).i32_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t__bindgen_ty_1),
            "::",
            stringify!(i32_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t__bindgen_ty_1>())).i64_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t__bindgen_ty_1),
            "::",
            stringify!(i64_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t__bindgen_ty_1>())).f32_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t__bindgen_ty_1),
            "::",
            stringify!(f32_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t__bindgen_ty_1>())).f64_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t__bindgen_ty_1),
            "::",
            stringify!(f64_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t__bindgen_ty_1>())).ref_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t__bindgen_ty_1),
            "::",
            stringify!(ref_)
        )
    );
}
#[test]
fn bindgen_test_layout_wasm_val_t() {
    assert_eq!(
        ::std::mem::size_of::<wasm_val_t>(),
        16usize,
        concat!("Size of: ", stringify!(wasm_val_t))
    );
    assert_eq!(
        ::std::mem::align_of::<wasm_val_t>(),
        8usize,
        concat!("Alignment of ", stringify!(wasm_val_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t>())).kind as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t),
            "::",
            stringify!(kind)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<wasm_val_t>())).of as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(wasm_val_t),
            "::",
            stringify!(of)
        )
    );
}
extern "C" {
    #[doc = " Initialize the WASM runtime environment, and also initialize"]
    #[doc = " the memory allocator with system allocator, which calls os_malloc"]
    #[doc = " to allocate memory"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise"]
    pub fn wasm_runtime_init() -> bool;
}
extern "C" {
    #[doc = " Initialize the WASM runtime environment, and also initialize"]
    #[doc = " the memory allocator and register native symbols, which are specified"]
    #[doc = " with init arguments"]
    #[doc = ""]
    #[doc = " @param init_args specifies the init arguments"]
    #[doc = ""]
    #[doc = " @return return true if success, false otherwise"]
    pub fn wasm_runtime_full_init(init_args: *mut RuntimeInitArgs) -> bool;
}
extern "C" {
    #[doc = " Destroy the WASM runtime environment."]
    pub fn wasm_runtime_destroy();
}
extern "C" {
    #[doc = " Allocate memory from runtime memory environment."]
    #[doc = ""]
    #[doc = " @param size bytes need to allocate"]
    #[doc = ""]
    #[doc = " @return the pointer to memory allocated"]
    pub fn wasm_runtime_malloc(size: ::std::os::raw::c_uint) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " Reallocate memory from runtime memory environment"]
    #[doc = ""]
    #[doc = " @param ptr the original memory"]
    #[doc = " @param size bytes need to reallocate"]
    #[doc = ""]
    #[doc = " @return the pointer to memory reallocated"]
    pub fn wasm_runtime_realloc(
        ptr: *mut ::std::os::raw::c_void,
        size: ::std::os::raw::c_uint,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    pub fn wasm_runtime_free(ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
    #[doc = " Get the package type of a buffer."]
    #[doc = ""]
    #[doc = " @param buf the package buffer"]
    #[doc = " @param size the package buffer size"]
    #[doc = ""]
    #[doc = " @return the package type, return Package_Type_Unknown if the type is unknown"]
    pub fn get_package_type(buf: *const u8, size: u32) -> package_type_t;
}
extern "C" {
    #[doc = " Load a WASM module from a specified byte buffer. The byte buffer can be"]
    #[doc = " WASM binary data when interpreter or JIT is enabled, or AOT binary data"]
    #[doc = " when AOT is enabled. If it is AOT binary data, it must be 4-byte aligned."]
    #[doc = ""]
    #[doc = " @param buf the byte buffer which contains the WASM binary data"]
    #[doc = " @param size the size of the buffer"]
    #[doc = " @param error_buf output of the exception info"]
    #[doc = " @param error_buf_size the size of the exception string"]
    #[doc = ""]
    #[doc = " @return return WASM module loaded, NULL if failed"]
    pub fn wasm_runtime_load(
        buf: *const u8,
        size: u32,
        error_buf: *mut ::std::os::raw::c_char,
        error_buf_size: u32,
    ) -> wasm_module_t;
}
extern "C" {
    #[doc = " Load a WASM module from a specified WASM or AOT section list."]
    #[doc = ""]
    #[doc = " @param section_list the section list which contains each section data"]
    #[doc = " @param is_aot whether the section list is AOT section list"]
    #[doc = " @param error_buf output of the exception info"]
    #[doc = " @param error_buf_size the size of the exception string"]
    #[doc = ""]
    #[doc = " @return return WASM module loaded, NULL if failed"]
    pub fn wasm_runtime_load_from_sections(
        section_list: wasm_section_list_t,
        is_aot: bool,
        error_buf: *mut ::std::os::raw::c_char,
        error_buf_size: u32,
    ) -> wasm_module_t;
}
extern "C" {
    #[doc = " Unload a WASM module."]
    #[doc = ""]
    #[doc = " @param module the module to be unloaded"]
    pub fn wasm_runtime_unload(module: wasm_module_t);
}
extern "C" {
    pub fn wasm_runtime_set_wasi_args(
        module: wasm_module_t,
        dir_list: *mut *const ::std::os::raw::c_char,
        dir_count: u32,
        map_dir_list: *mut *const ::std::os::raw::c_char,
        map_dir_count: u32,
        env: *mut *const ::std::os::raw::c_char,
        env_count: u32,
        argv: *mut *mut ::std::os::raw::c_char,
        argc: ::std::os::raw::c_int,
    );
}
extern "C" {
    #[doc = " Instantiate a WASM module."]
    #[doc = ""]
    #[doc = " @param module the WASM module to instantiate"]
    #[doc = " @param stack_size the default stack size of the module instance when the"]
    #[doc = "        exec env's operation stack isn't created by user, e.g. API"]
    #[doc = "        wasm_application_execute_main() and wasm_application_execute_func()"]
    #[doc = "        create the operation stack internally with the stack size specified"]
    #[doc = "        here. And API wasm_runtime_create_exec_env() creates the operation"]
    #[doc = "        stack with stack size specified by its parameter, the stack size"]
    #[doc = "        specified here is ignored."]
    #[doc = " @param heap_size the default heap size of the module instance, a heap will"]
    #[doc = "        be created besides the app memory space. Both wasm app and native"]
    #[doc = "        function can allocate memory from the heap. If heap_size is 0, the"]
    #[doc = "        default heap size will be used."]
    #[doc = " @param error_buf buffer to output the error info if failed"]
    #[doc = " @param error_buf_size the size of the error buffer"]
    #[doc = ""]
    #[doc = " @return return the instantiated WASM module instance, NULL if failed"]
    pub fn wasm_runtime_instantiate(
        module: wasm_module_t,
        stack_size: u32,
        heap_size: u32,
        error_buf: *mut ::std::os::raw::c_char,
        error_buf_size: u32,
    ) -> wasm_module_inst_t;
}
extern "C" {
    #[doc = " Deinstantiate a WASM module instance, destroy the resources."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance to destroy"]
    pub fn wasm_runtime_deinstantiate(module_inst: wasm_module_inst_t);
}
extern "C" {
    pub fn wasm_runtime_is_wasi_mode(module_inst: wasm_module_inst_t) -> bool;
}
extern "C" {
    pub fn wasm_runtime_lookup_wasi_start_function(
        module_inst: wasm_module_inst_t,
    ) -> wasm_function_inst_t;
}
extern "C" {
    #[doc = " Lookup an exported function in the WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the module instance"]
    #[doc = " @param name the name of the function"]
    #[doc = " @param signature the signature of the function, ignored currently"]
    #[doc = ""]
    #[doc = " @return the function instance found, NULL if not found"]
    pub fn wasm_runtime_lookup_function(
        module_inst: wasm_module_inst_t,
        name: *const ::std::os::raw::c_char,
        signature: *const ::std::os::raw::c_char,
    ) -> wasm_function_inst_t;
}
extern "C" {
    #[doc = " Create execution environment for a WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the module instance"]
    #[doc = " @param stack_size the stack size to execute a WASM function"]
    #[doc = ""]
    #[doc = " @return the execution environment, NULL if failed, e.g. invalid"]
    #[doc = "         stack size is passed"]
    pub fn wasm_runtime_create_exec_env(
        module_inst: wasm_module_inst_t,
        stack_size: u32,
    ) -> wasm_exec_env_t;
}
extern "C" {
    #[doc = " Destroy the execution environment."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to destroy"]
    pub fn wasm_runtime_destroy_exec_env(exec_env: wasm_exec_env_t);
}
extern "C" {
    #[doc = " Get WASM module instance from execution environment"]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to retrieve"]
    #[doc = ""]
    #[doc = " @return the WASM module instance"]
    pub fn wasm_runtime_get_module_inst(exec_env: wasm_exec_env_t) -> wasm_module_inst_t;
}
extern "C" {
    #[doc = " Call the given WASM function of a WASM module instance with"]
    #[doc = " arguments (bytecode and AoT)."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to call the function,"]
    #[doc = "   which must be created from wasm_create_exec_env()"]
    #[doc = " @param function the function to call"]
    #[doc = " @param argc the number of arguments"]
    #[doc = " @param argv the arguments. If the function has return value,"]
    #[doc = "   the first (or first two in case 64-bit return value) element of"]
    #[doc = "   argv stores the return value of the called WASM function after this"]
    #[doc = "   function returns."]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise and exception will be thrown,"]
    #[doc = "   the caller can call wasm_runtime_get_exception to get the exception"]
    #[doc = "   info."]
    pub fn wasm_runtime_call_wasm(
        exec_env: wasm_exec_env_t,
        function: wasm_function_inst_t,
        argc: u32,
        argv: *mut u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Call the given WASM function of a WASM module instance with"]
    #[doc = " provided results space and arguments (bytecode and AoT)."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to call the function,"]
    #[doc = "   which must be created from wasm_create_exec_env()"]
    #[doc = " @param function the function to call"]
    #[doc = " @param num_results the number of results"]
    #[doc = " @param results the pre-alloced pointer to get the results"]
    #[doc = " @param num_args the number of arguments"]
    #[doc = " @param args the arguments"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise and exception will be thrown,"]
    #[doc = "   the caller can call wasm_runtime_get_exception to get the exception"]
    #[doc = "   info."]
    pub fn wasm_runtime_call_wasm_a(
        exec_env: wasm_exec_env_t,
        function: wasm_function_inst_t,
        num_results: u32,
        results: *mut wasm_val_t,
        num_args: u32,
        args: *mut wasm_val_t,
    ) -> bool;
}
extern "C" {
    #[doc = " Call the given WASM function of a WASM module instance with"]
    #[doc = " provided results space and variant arguments (bytecode and AoT)."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to call the function,"]
    #[doc = "   which must be created from wasm_create_exec_env()"]
    #[doc = " @param function the function to call"]
    #[doc = " @param num_results the number of results"]
    #[doc = " @param results the pre-alloced pointer to get the results"]
    #[doc = " @param num_args the number of arguments"]
    #[doc = " @param ... the variant arguments"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise and exception will be thrown,"]
    #[doc = "   the caller can call wasm_runtime_get_exception to get the exception"]
    #[doc = "   info."]
    pub fn wasm_runtime_call_wasm_v(
        exec_env: wasm_exec_env_t,
        function: wasm_function_inst_t,
        num_results: u32,
        results: *mut wasm_val_t,
        num_args: u32,
        ...
    ) -> bool;
}
extern "C" {
    #[doc = " Find the unique main function from a WASM module instance"]
    #[doc = " and execute that function."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param argc the number of arguments"]
    #[doc = " @param argv the arguments array"]
    #[doc = ""]
    #[doc = " @return true if the main function is called, false otherwise and exception"]
    #[doc = "   will be thrown, the caller can call wasm_runtime_get_exception to get"]
    #[doc = "   the exception info."]
    pub fn wasm_application_execute_main(
        module_inst: wasm_module_inst_t,
        argc: i32,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " Find the specified function in argv[0] from a WASM module instance"]
    #[doc = " and execute that function."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param name the name of the function to execute."]
    #[doc = "  to indicate the module name via: $module_name$function_name"]
    #[doc = "  or just a function name: function_name"]
    #[doc = " @param argc the number of arguments"]
    #[doc = " @param argv the arguments array"]
    #[doc = ""]
    #[doc = " @return true if the specified function is called, false otherwise and"]
    #[doc = "   exception will be thrown, the caller can call wasm_runtime_get_exception"]
    #[doc = "   to get the exception info."]
    pub fn wasm_application_execute_func(
        module_inst: wasm_module_inst_t,
        name: *const ::std::os::raw::c_char,
        argc: i32,
        argv: *mut *mut ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " Get exception info of the WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = ""]
    #[doc = " @return the exception string"]
    pub fn wasm_runtime_get_exception(
        module_inst: wasm_module_inst_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Set exception info of the WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = ""]
    #[doc = " @param exception the exception string"]
    pub fn wasm_runtime_set_exception(
        module_inst: wasm_module_inst_t,
        exception: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " Clear exception info of the WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    pub fn wasm_runtime_clear_exception(module_inst: wasm_module_inst_t);
}
extern "C" {
    #[doc = " Set custom data to WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param custom_data the custom data to be set"]
    pub fn wasm_runtime_set_custom_data(
        module_inst: wasm_module_inst_t,
        custom_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Get the custom data within a WASM module instance."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = ""]
    #[doc = " @return the custom data (NULL if not set yet)"]
    pub fn wasm_runtime_get_custom_data(
        module_inst: wasm_module_inst_t,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " Allocate memory from the heap of WASM module instance"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance which contains heap"]
    #[doc = " @param size the size bytes to allocate"]
    #[doc = " @param p_native_addr return native address of the allocated memory"]
    #[doc = "        if it is not NULL, and return NULL if memory malloc failed"]
    #[doc = ""]
    #[doc = " @return the allocated memory address, which is a relative offset to the"]
    #[doc = "         base address of the module instance's memory space. Note that"]
    #[doc = "         it is not an absolute address."]
    #[doc = "         Return non-zero if success, zero if failed."]
    pub fn wasm_runtime_module_malloc(
        module_inst: wasm_module_inst_t,
        size: u32,
        p_native_addr: *mut *mut ::std::os::raw::c_void,
    ) -> u32;
}
extern "C" {
    #[doc = " Free memory to the heap of WASM module instance"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance which contains heap"]
    #[doc = " @param ptr the pointer to free"]
    pub fn wasm_runtime_module_free(module_inst: wasm_module_inst_t, ptr: u32);
}
extern "C" {
    #[doc = " Allocate memory from the heap of WASM module instance and initialize"]
    #[doc = " the memory with src"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance which contains heap"]
    #[doc = " @param src the source data to copy"]
    #[doc = " @param size the size of the source data"]
    #[doc = ""]
    #[doc = " @return the allocated memory address, which is a relative offset to the"]
    #[doc = "         base address of the module instance's memory space. Note that"]
    #[doc = "         it is not an absolute address."]
    #[doc = "         Return non-zero if success, zero if failed."]
    pub fn wasm_runtime_module_dup_data(
        module_inst: wasm_module_inst_t,
        src: *const ::std::os::raw::c_char,
        size: u32,
    ) -> u32;
}
extern "C" {
    #[doc = " Validate the app address, check whether it belongs to WASM module"]
    #[doc = " instance's address space, or in its heap space or memory space."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param app_offset the app address to validate, which is a relative address"]
    #[doc = " @param size the size bytes of the app address"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise. If failed, an exception will"]
    #[doc = "         be thrown."]
    pub fn wasm_runtime_validate_app_addr(
        module_inst: wasm_module_inst_t,
        app_offset: u32,
        size: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Similar to wasm_runtime_validate_app_addr(), except that the size parameter"]
    #[doc = " is not provided. This function validates the app string address, check whether it"]
    #[doc = " belongs to WASM module instance's address space, or in its heap space or"]
    #[doc = " memory space. Moreover, it checks whether it is the offset of a string that"]
    #[doc = " is end with '\\0'."]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param app_str_offset the app address of the string to validate, which is a"]
    #[doc = "        relative address"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise. If failed, an exception will"]
    #[doc = "         be thrown."]
    pub fn wasm_runtime_validate_app_str_addr(
        module_inst: wasm_module_inst_t,
        app_str_offset: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Validate the native address, check whether it belongs to WASM module"]
    #[doc = " instance's address space, or in its heap space or memory space."]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param native_ptr the native address to validate, which is an absolute"]
    #[doc = "        address"]
    #[doc = " @param size the size bytes of the app address"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise. If failed, an exception will"]
    #[doc = "         be thrown."]
    pub fn wasm_runtime_validate_native_addr(
        module_inst: wasm_module_inst_t,
        native_ptr: *mut ::std::os::raw::c_void,
        size: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Convert app address(relative address) to native address(absolute address)"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param app_offset the app adress"]
    #[doc = ""]
    #[doc = " @return the native address converted"]
    pub fn wasm_runtime_addr_app_to_native(
        module_inst: wasm_module_inst_t,
        app_offset: u32,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " Convert native address(absolute address) to app address(relative address)"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param native_ptr the native address"]
    #[doc = ""]
    #[doc = " @return the app address converted"]
    pub fn wasm_runtime_addr_native_to_app(
        module_inst: wasm_module_inst_t,
        native_ptr: *mut ::std::os::raw::c_void,
    ) -> u32;
}
extern "C" {
    #[doc = " Get the app address range (relative address) that a app address belongs to"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param app_offset the app address to retrieve"]
    #[doc = " @param p_app_start_offset buffer to output the app start offset if not NULL"]
    #[doc = " @param p_app_end_offset buffer to output the app end offset if not NULL"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise."]
    pub fn wasm_runtime_get_app_addr_range(
        module_inst: wasm_module_inst_t,
        app_offset: u32,
        p_app_start_offset: *mut u32,
        p_app_end_offset: *mut u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Get the native address range (absolute address) that a native address belongs to"]
    #[doc = ""]
    #[doc = " @param module_inst the WASM module instance"]
    #[doc = " @param native_ptr the native address to retrieve"]
    #[doc = " @param p_native_start_addr buffer to output the native start address if not NULL"]
    #[doc = " @param p_native_end_addr buffer to output the native end address if not NULL"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise."]
    pub fn wasm_runtime_get_native_addr_range(
        module_inst: wasm_module_inst_t,
        native_ptr: *mut u8,
        p_native_start_addr: *mut *mut u8,
        p_native_end_addr: *mut *mut u8,
    ) -> bool;
}
extern "C" {
    #[doc = " Register native functions with same module name"]
    #[doc = ""]
    #[doc = " @param module_name the module name of the native functions"]
    #[doc = " @param native_symbols specifies an array of NativeSymbol structures which"]
    #[doc = "        contain the names, function pointers and signatures"]
    #[doc = "        Note: WASM runtime will not allocate memory to clone the data, so"]
    #[doc = "              user must ensure the array can be used forever"]
    #[doc = "        Meanings of letters in function signature:"]
    #[doc = "          'i': the parameter is i32 type"]
    #[doc = "          'I': the parameter is i64 type"]
    #[doc = "          'f': the parameter is f32 type"]
    #[doc = "          'F': the parameter is f64 type"]
    #[doc = "          '*': the parameter is a pointer (i32 in WASM), and runtime will"]
    #[doc = "               auto check its boundary before calling the native function."]
    #[doc = "               If it is followed by '~', the checked length of the pointer"]
    #[doc = "               is gotten from the following parameter, if not, the checked"]
    #[doc = "               length of the pointer is 1."]
    #[doc = "          '~': the parameter is the pointer's length with i32 type, and must"]
    #[doc = "               follow after '*'"]
    #[doc = "          '$': the parameter is a string (i32 in WASM), and runtime will"]
    #[doc = "               auto check its boundary before calling the native function"]
    #[doc = " @param n_native_symbols specifies the number of native symbols in the array"]
    #[doc = ""]
    #[doc = " @return true if success, false otherwise"]
    pub fn wasm_runtime_register_natives(
        module_name: *const ::std::os::raw::c_char,
        native_symbols: *mut NativeSymbol,
        n_native_symbols: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Register native functions with same module name, similar to"]
    #[doc = "   wasm_runtime_register_natives, the difference is that runtime passes raw"]
    #[doc = " arguments to native API, which means that the native API should be defined as:"]
    #[doc = "   void foo(wasm_exec_env_t exec_env, uint64 *args);"]
    #[doc = " and native API should extract arguments one by one from args array with macro"]
    #[doc = "   native_raw_get_arg"]
    #[doc = " and write the return value back to args[0] with macro"]
    #[doc = "   native_raw_return_type and native_raw_set_return"]
    pub fn wasm_runtime_register_natives_raw(
        module_name: *const ::std::os::raw::c_char,
        native_symbols: *mut NativeSymbol,
        n_native_symbols: u32,
    ) -> bool;
}
extern "C" {
    #[doc = " Get attachment of native function from execution environment"]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment to retrieve"]
    #[doc = ""]
    #[doc = " @return the attachment of native function"]
    pub fn wasm_runtime_get_function_attachment(
        exec_env: wasm_exec_env_t,
    ) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " Set user data to execution environment."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment"]
    #[doc = " @param user_data the user data to be set"]
    pub fn wasm_runtime_set_user_data(
        exec_env: wasm_exec_env_t,
        user_data: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Get the user data within execution environment."]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment"]
    #[doc = ""]
    #[doc = " @return the user data (NULL if not set yet)"]
    pub fn wasm_runtime_get_user_data(exec_env: wasm_exec_env_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
    #[doc = " Dump runtime memory consumption, including:"]
    #[doc = "     Exec env memory consumption"]
    #[doc = "     WASM module memory consumption"]
    #[doc = "     WASM module instance memory consumption"]
    #[doc = "     stack and app heap used info"]
    #[doc = ""]
    #[doc = " @param exec_env the execution environment"]
    pub fn wasm_runtime_dump_mem_consumption(exec_env: wasm_exec_env_t);
}