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);
}