Crate wamr_sys Copy item path Source InstantiationArgs LoadArgs MemAllocOption__bindgen_ty_1 MemAllocOption__bindgen_ty_2 NativeSymbol RuntimeInitArgs SharedHeapInitArgs WASMExecEnv WASMFuncType WASMGlobalType WASMMemory WASMMemoryInstance WASMModuleCommon WASMModuleInstanceCommon WASMSharedHeap WASMTableType __fsid_t mem_alloc_info_t wasm_export_t wasm_frame_t wasm_global_inst_t wasm_import_t wasm_ref_t wasm_section_t wasm_table_inst_t wasm_val_t INT8_MAX INT8_MIN INT16_MAX INT16_MIN INT32_MAX INT32_MIN INTPTR_MAX INTPTR_MIN INT_FAST8_MAX INT_FAST8_MIN INT_FAST16_MAX INT_FAST16_MIN INT_FAST32_MAX INT_FAST32_MIN INT_LEAST8_MAX INT_LEAST8_MIN INT_LEAST16_MAX INT_LEAST16_MIN INT_LEAST32_MAX INT_LEAST32_MIN PTRDIFF_MAX PTRDIFF_MIN RunningMode_Mode_Fast_JIT RunningMode_Mode_Interp RunningMode_Mode_LLVM_JIT RunningMode_Mode_Multi_Tier_JIT SIG_ATOMIC_MAX SIG_ATOMIC_MIN SIZE_MAX UINT8_MAX UINT16_MAX UINT32_MAX UINTPTR_MAX UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX WINT_MAX WINT_MIN _ATFILE_SOURCE _BITS_STDINT_INTN_H _BITS_STDINT_LEAST_H _BITS_STDINT_UINTN_H _BITS_TIME64_H _BITS_TYPESIZES_H _BITS_TYPES_H _BITS_WCHAR_H _DEFAULT_SOURCE _FEATURES_H _POSIX_C_SOURCE _POSIX_SOURCE _STDC_PREDEF_H _STDINT_H _SYS_CDEFS_H __FD_SETSIZE __GLIBC_MINOR__ __GLIBC_USE_C2X_STRTOL __GLIBC_USE_DEPRECATED_GETS __GLIBC_USE_DEPRECATED_SCANF __GLIBC_USE_IEC_60559_BFP_EXT __GLIBC_USE_IEC_60559_BFP_EXT_C2X __GLIBC_USE_IEC_60559_EXT __GLIBC_USE_IEC_60559_FUNCS_EXT __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X __GLIBC_USE_IEC_60559_TYPES_EXT __GLIBC_USE_ISOC2X __GLIBC_USE_LIB_EXT2 __GLIBC__ __GNU_LIBRARY__ __HAVE_GENERIC_SELECTION __INO_T_MATCHES_INO64_T __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI __OFF_T_MATCHES_OFF64_T __RLIM_T_MATCHES_RLIM64_T __STATFS_MATCHES_STATFS64 __STDC_IEC_559_COMPLEX__ __STDC_IEC_559__ __STDC_IEC_60559_BFP__ __STDC_IEC_60559_COMPLEX__ __STDC_ISO_10646__ __SYSCALL_WORDSIZE __TIMESIZE __USE_ATFILE __USE_FORTIFY_LEVEL __USE_ISOC11 __USE_ISOC95 __USE_ISOC99 __USE_MISC __USE_POSIX __USE_POSIX2 __USE_POSIX199309 __USE_POSIX199506 __USE_POSIX_IMPLICITLY __USE_XOPEN2K __USE_XOPEN2K8 __WORDSIZE __WORDSIZE_TIME64_COMPAT32 __bool_true_false_are_defined __glibc_c99_flexarr_available enlarge_memory_error_reason_t_INTERNAL_ERROR enlarge_memory_error_reason_t_MAX_SIZE_REACHED false_ log_level_t_WASM_LOG_LEVEL_DEBUG log_level_t_WASM_LOG_LEVEL_ERROR log_level_t_WASM_LOG_LEVEL_FATAL log_level_t_WASM_LOG_LEVEL_VERBOSE log_level_t_WASM_LOG_LEVEL_WARNING mem_alloc_type_t_Alloc_With_Allocator mem_alloc_type_t_Alloc_With_Pool mem_alloc_type_t_Alloc_With_System_Allocator mem_alloc_usage_t_Alloc_For_LinearMemory mem_alloc_usage_t_Alloc_For_Runtime package_type_t_Package_Type_Unknown package_type_t_Wasm_Module_AoT package_type_t_Wasm_Module_Bytecode true_ wasm_import_export_kind_t_WASM_IMPORT_EXPORT_KIND_FUNC wasm_import_export_kind_t_WASM_IMPORT_EXPORT_KIND_GLOBAL wasm_import_export_kind_t_WASM_IMPORT_EXPORT_KIND_MEMORY wasm_import_export_kind_t_WASM_IMPORT_EXPORT_KIND_TABLE wasm_valkind_enum_WASM_EXTERNREF wasm_valkind_enum_WASM_F32 wasm_valkind_enum_WASM_F64 wasm_valkind_enum_WASM_FUNCREF wasm_valkind_enum_WASM_I32 wasm_valkind_enum_WASM_I64 wasm_valkind_enum_WASM_V128 get_base_lib_export_apis ⚠ Get the exported APIs of base lib get_package_type ⚠ Get the package type of a buffer. wasm_application_execute_func ⚠ Find the specified function from a WASM module instance and execute
that function. wasm_application_execute_main ⚠ Find the unique main function from a WASM module instance
and execute that function. wasm_copy_callstack ⚠ @brief Copy callstack frames. wasm_externref_obj2ref ⚠ Map external object to an internal externref index: if the index
has been created, return it, otherwise create the index. wasm_externref_objdel ⚠ Delete external object registered by wasm_externref_obj2ref
. wasm_externref_ref2obj ⚠ Retrieve the external object from an internal externref index wasm_externref_retain ⚠ Retain an extern object which is mapped to the internal externref
so that the object won’t be cleaned during extern object reclaim
if it isn’t used. wasm_externref_set_cleanup ⚠ Set cleanup callback to release external object. wasm_func_get_param_count ⚠ Get parameter count of the function instance wasm_func_get_param_types ⚠ Get parameter types of the function instance wasm_func_get_result_count ⚠ Get result count of the function instance wasm_func_get_result_types ⚠ Get result types of the function instance wasm_func_type_get_param_count ⚠ Get the number of parameters for a function type wasm_func_type_get_param_valkind ⚠ Get the kind of a parameter for a function type wasm_func_type_get_result_count ⚠ Get the number of results for a function type wasm_func_type_get_result_valkind ⚠ Get the kind of a result for a function type wasm_global_type_get_mutable ⚠ Get the mutability for a global type wasm_global_type_get_valkind ⚠ Get the kind for a global type wasm_memory_enlarge ⚠ @brief Enlarge a memory instance by a number of pages wasm_memory_get_base_address ⚠ @brief Get the base address for a memory instance wasm_memory_get_bytes_per_page ⚠ @brief Get the number of bytes per page for a memory instance wasm_memory_get_cur_page_count ⚠ @brief Get the current number of pages for a memory instance wasm_memory_get_max_page_count ⚠ @brief Get the maximum number of pages for a memory instance wasm_memory_get_shared ⚠ @brief Get the shared status for a memory instance wasm_memory_type_get_init_page_count ⚠ Get the initial page count for a memory type wasm_memory_type_get_max_page_count ⚠ Get the maximum page count for a memory type wasm_memory_type_get_shared ⚠ Get the shared setting for a memory type wasm_runtime_addr_app_to_native ⚠ Convert app address (relative address) to native address (absolute address) wasm_runtime_addr_native_to_app ⚠ Convert native address (absolute address) to app address (relative address) wasm_runtime_attach_shared_heap ⚠ Attach a shared heap to a module instance wasm_runtime_begin_blocking_op ⚠ wasm_runtime_call_indirect ⚠ Call a function reference of a given WASM runtime instance with
arguments. wasm_runtime_call_wasm ⚠ Call the given WASM function of a WASM module instance with
arguments (bytecode and AoT). wasm_runtime_call_wasm_a ⚠ Call the given WASM function of a WASM module instance with
provided results space and arguments (bytecode and AoT). wasm_runtime_call_wasm_v ⚠ Call the given WASM function of a WASM module instance with
provided results space and variant arguments (bytecode and AoT). wasm_runtime_clear_exception ⚠ Clear exception info of the WASM module instance. wasm_runtime_create_context_key ⚠ wasm_runtime_create_exec_env ⚠ Create execution environment for a WASM module instance. wasm_runtime_create_shared_heap ⚠ Create a shared heap wasm_runtime_deinstantiate ⚠ Deinstantiate a WASM module instance, destroy the resources. wasm_runtime_destroy ⚠ Destroy the WASM runtime environment. wasm_runtime_destroy_context_key ⚠ wasm_runtime_destroy_exec_env ⚠ Destroy the execution environment. wasm_runtime_destroy_spawned_exec_env ⚠ Destroy the spawned exec_env wasm_runtime_destroy_thread_env ⚠ Destroy the thread environment wasm_runtime_detach_shared_heap ⚠ Detach a shared heap from a module instance wasm_runtime_detect_native_stack_overflow ⚠ wasm_runtime_detect_native_stack_overflow_size ⚠ wasm_runtime_dump_call_stack ⚠ Dump the call stack to stdout wasm_runtime_dump_call_stack_to_buf ⚠ Dump the call stack to buffer. wasm_runtime_dump_mem_consumption ⚠ Dump runtime memory consumption, including:
Exec env memory consumption
WASM module memory consumption
WASM module instance memory consumption
stack and app heap used info wasm_runtime_dump_perf_profiling ⚠ Dump runtime performance profiler data of each function wasm_runtime_dump_pgo_prof_data_to_buf ⚠ Dump the LLVM PGO profile data to buffer wasm_runtime_end_blocking_op ⚠ wasm_runtime_enlarge_memory ⚠ Enlarge the memory region for a module instance wasm_runtime_find_module_registered ⚠ Check if there is already a loaded module named module_name in the
runtime. Repeatedly loading a module with the same name is not allowed. wasm_runtime_free ⚠ wasm_runtime_full_init ⚠ Initialize the WASM runtime environment, WASM running mode,
and also initialize the memory allocator and register native symbols,
which are specified with init arguments wasm_runtime_get_app_addr_range ⚠ Get the app address range (relative address) that a app address belongs to wasm_runtime_get_call_stack_buf_size ⚠ Get the size required to store the call stack contents, including
the space for terminating null byte (‘\0’) wasm_runtime_get_context ⚠ wasm_runtime_get_current_package_version ⚠ Get the currently supported version of the package type wasm_runtime_get_custom_data ⚠ Get the custom data within a WASM module instance. wasm_runtime_get_custom_section ⚠ Get a custom section by name wasm_runtime_get_default_memory ⚠ @brief Get the default memory instance wasm_runtime_get_exception ⚠ Get exception info of the WASM module instance. wasm_runtime_get_exec_env_singleton ⚠ Get the singleton execution environment for the instance. wasm_runtime_get_export_count ⚠ Get the number of export items for a WASM module wasm_runtime_get_export_global_inst ⚠ Get an export global instance wasm_runtime_get_export_table_inst ⚠ Get an export table instance wasm_runtime_get_export_type ⚠ Get information about a specific WASM module export wasm_runtime_get_file_package_type ⚠ Get the package type of a buffer (same as get_package_type). wasm_runtime_get_file_package_version ⚠ Get the package version of a buffer. wasm_runtime_get_function_attachment ⚠ Get attachment of native function from execution environment wasm_runtime_get_import_count ⚠ Get the number of import items for a WASM module wasm_runtime_get_import_type ⚠ Get information about a specific WASM module import wasm_runtime_get_mem_alloc_info ⚠ wasm_runtime_get_memory ⚠ @brief Get a memory instance by index wasm_runtime_get_module ⚠ Get WASM module from WASM module instance wasm_runtime_get_module_hash ⚠ Get the module hash of a WASM module, currently only available on
linux-sgx platform when the remote attestation feature is enabled wasm_runtime_get_module_inst ⚠ Get WASM module instance from execution environment wasm_runtime_get_module_name ⚠ wasm_runtime_get_module_package_type ⚠ Get the package type of a module. wasm_runtime_get_module_package_version ⚠ Get the package version of a module wasm_runtime_get_native_addr_range ⚠ Get the native address range (absolute address) that a native address
belongs to wasm_runtime_get_pgo_prof_data_size ⚠ Get the size required to store the LLVM PGO profile data wasm_runtime_get_running_mode ⚠ Get the running mode of a WASM module instance, if no running mode
is explicitly set the default running mode of runtime will
be used and returned. Note that it only makes sense when the input is a
wasm bytecode file: for the AOT file, this function always returns 0. wasm_runtime_get_user_data ⚠ Get the user data within execution environment. wasm_runtime_get_version ⚠ Get WAMR semantic version wasm_runtime_get_wasi_exit_code ⚠ Get WASI exit code. wasm_runtime_get_wasm_func_exec_time ⚠ Return execution time in ms of a given wasm function with
func_name. If the function is not found, return 0. wasm_runtime_init ⚠ Initialize the WASM runtime environment, and also initialize
the memory allocator with system allocator, which calls os_malloc
to allocate memory wasm_runtime_init_thread_env ⚠ Initialize the thread environment.
Note:
If developer creates a child thread by himself to call the
the wasm function in that thread, he should call this API
firstly before calling the wasm function and then call
wasm_runtime_destroy_thread_env() after calling the wasm
function. If the thread is created from the runtime API,
it is unnecessary to call these two APIs. wasm_runtime_instantiate ⚠ Instantiate a WASM module. wasm_runtime_instantiate_ex ⚠ Instantiate a WASM module, with specified instantiation arguments wasm_runtime_is_bounds_checks_enabled ⚠ Check if the memory bounds checks flag is enabled for a WASM module instance. wasm_runtime_is_import_func_linked ⚠ Check whether an import func (import <module_name> <func_name> (func ...))
is linked or not with runtime registered native functions wasm_runtime_is_import_global_linked ⚠ Check whether an import global (import <module_name> <global_name> (global ...))
is linked or not with runtime registered native globals wasm_runtime_is_running_mode_supported ⚠ Query whether a certain running mode is supported for the runtime wasm_runtime_is_underlying_binary_freeable ⚠ Query whether the wasm binary buffer used to create the module can be freed wasm_runtime_is_wasi_mode ⚠ wasm_runtime_is_xip_file ⚠ Check whether a file is an AOT XIP (Execution In Place) file wasm_runtime_join_thread ⚠ Wait a spawned thread to terminate wasm_runtime_load ⚠ Load a WASM module from a specified byte buffer. The byte buffer can be
WASM binary data when interpreter or JIT is enabled, or AOT binary data
when AOT is enabled. If it is AOT binary data, it must be 4-byte aligned. wasm_runtime_load_ex ⚠ Load a WASM module with specified load argument. wasm_runtime_load_from_sections ⚠ Load a WASM module from a specified WASM or AOT section list. wasm_runtime_lookup_function ⚠ Lookup an exported function in the WASM module instance. wasm_runtime_lookup_memory ⚠ @brief Lookup a memory instance by name wasm_runtime_lookup_wasi_start_function ⚠ wasm_runtime_malloc ⚠ Allocate memory from runtime memory environment. wasm_runtime_module_dup_data ⚠ Allocate memory from the heap of WASM module instance and initialize
the memory with src wasm_runtime_module_free ⚠ Free memory to the heap of WASM module instance wasm_runtime_module_malloc ⚠ Allocate memory from the heap of WASM module instance wasm_runtime_realloc ⚠ Reallocate memory from runtime memory environment wasm_runtime_register_module ⚠ Give the “module” a name “module_name”.
Can not assign a new name to a module if it already has a name wasm_runtime_register_natives ⚠ Register native functions with same module name wasm_runtime_register_natives_raw ⚠ Register native functions with same module name, similar to
wasm_runtime_register_natives, the difference is that runtime passes raw
arguments to native API, which means that the native API should be defined as
void foo(wasm_exec_env_t exec_env, uint64 *args);
and native API should extract arguments one by one from args array with macro
native_raw_get_arg
and write the return value back to args[0] with macro
native_raw_return_type and native_raw_set_return wasm_runtime_resolve_symbols ⚠ Resolve symbols for a previously loaded WASM module. Only useful when the
module was loaded with LoadArgs::no_resolve set to true wasm_runtime_set_bounds_checks ⚠ Set the memory bounds checks flag of a WASM module instance. wasm_runtime_set_context ⚠ wasm_runtime_set_context_spread ⚠ wasm_runtime_set_custom_data ⚠ Set custom data to WASM module instance.
Note:
If WAMR_BUILD_LIB_PTHREAD is enabled, this API
will spread the custom data to all threads wasm_runtime_set_default_running_mode ⚠ Set the default running mode for the runtime. It is inherited
to set the running mode of a module instance when it is instantiated,
and can be changed by calling wasm_runtime_set_running_mode wasm_runtime_set_enlarge_mem_error_callback ⚠ Setup callback invoked when memory.grow fails wasm_runtime_set_exception ⚠ Set exception info of the WASM module instance. wasm_runtime_set_instruction_count_limit ⚠ Set the instruction count limit to the execution environment.
By default the instruction count limit is -1, which means no limit.
However, if the instruction count limit is set to a positive value,
the execution will be terminated when the instruction count reaches
the limit. wasm_runtime_set_log_level ⚠ Set the log level. To be called after the runtime is initialized. wasm_runtime_set_max_thread_num ⚠ Set the max thread num per cluster. wasm_runtime_set_module_inst ⚠ Set WASM module instance of execution environment
Caution:
normally the module instance is bound with the execution
environment one by one, if multiple module instances want
to share to the same execution environment, developer should
be responsible for the backup and restore of module instance wasm_runtime_set_module_name ⚠ wasm_runtime_set_module_reader ⚠ Setup callbacks for reading and releasing a buffer about a module file wasm_runtime_set_native_stack_boundary ⚠ Set native stack boundary to execution environment, if it is set,
it will be used instead of getting the boundary with the platform
layer API when calling wasm functions. This is useful for some
fiber cases. wasm_runtime_set_running_mode ⚠ Set the running mode of a WASM module instance, override the
default running mode of the runtime. Note that it only makes sense when
the input is a wasm bytecode file: for the AOT file, runtime always runs
it with AOT engine, and this function always returns true. wasm_runtime_set_user_data ⚠ Set user data to execution environment. wasm_runtime_set_wasi_addr_pool ⚠ wasm_runtime_set_wasi_args ⚠ Set WASI parameters. wasm_runtime_set_wasi_args_ex ⚠ Set WASI parameters. wasm_runtime_set_wasi_ns_lookup_pool ⚠ wasm_runtime_shared_heap_free ⚠ Free the memory allocated from shared heap wasm_runtime_shared_heap_malloc ⚠ Allocate memory from a shared heap wasm_runtime_spawn_exec_env ⚠ Spawn a new exec_env, the spawned exec_env
can be used in other threads wasm_runtime_spawn_thread ⚠ Spawn a thread from the given exec_env wasm_runtime_start_debug_instance ⚠ Same as wasm_runtime_start_debug_instance_with_port(env, -1). wasm_runtime_start_debug_instance_with_port ⚠ Start debug instance based on given execution environment.
Note:
The debug instance will be destroyed during destroying the
execution environment, developers don’t need to destroy it
manually.
If the cluster of this execution environment has already
been bound to a debug instance, this function will return true
directly.
If developer spawns some exec_env by wasm_runtime_spawn_exec_env,
don’t need to call this function for every spawned exec_env as
they are sharing the same cluster with the main exec_env. wasm_runtime_sum_wasm_exec_time ⚠ Return total wasm functions’ execution time in ms wasm_runtime_terminate ⚠ Terminate the WASM module instance. wasm_runtime_thread_env_inited ⚠ Whether the thread environment is initialized wasm_runtime_unload ⚠ Unload a WASM module. wasm_runtime_unregister_natives ⚠ Undo wasm_runtime_register_natives or wasm_runtime_register_natives_raw wasm_runtime_validate_app_addr ⚠ Validate the app address, check whether it belongs to WASM module
instance’s address space, or in its heap space or memory space. wasm_runtime_validate_app_str_addr ⚠ Similar to wasm_runtime_validate_app_addr(), except that the size parameter
is not provided. This function validates the app string address, check
whether it belongs to WASM module instance’s address space, or in its heap
space or memory space. Moreover, it checks whether it is the offset of a
string that is end with ‘\0’. wasm_runtime_validate_native_addr ⚠ Validate the native address, check whether it belongs to WASM module
instance’s address space, or in its heap space or memory space. wasm_table_get_func_inst ⚠ Get a function instance from a table. wasm_table_type_get_elem_kind ⚠ Get the element kind for a table type wasm_table_type_get_init_size ⚠ Get the initial size for a table type wasm_table_type_get_max_size ⚠ Get the maximum size for a table type wasm_table_type_get_shared ⚠ Get the sharing setting for a table type RunningMode WASMCApiFrame WASMFunctionInstanceCommon WASMMemoryType __blkcnt64_t __blkcnt_t __blksize_t __caddr_t __clock_t __clockid_t __daddr_t __dev_t __fsblkcnt64_t __fsblkcnt_t __fsfilcnt64_t __fsfilcnt_t __fsword_t __gid_t __id_t __ino64_t __ino_t __int8_t __int16_t __int32_t __int64_t __int_least8_t __int_least16_t __int_least32_t __int_least64_t __intmax_t __intptr_t __key_t __loff_t __mode_t __nlink_t __off64_t __off_t __pid_t __quad_t __rlim64_t __rlim_t __sig_atomic_t __socklen_t __ssize_t __suseconds64_t __suseconds_t __syscall_slong_t __syscall_ulong_t __time_t __timer_t __u_char __u_int __u_long __u_quad_t __u_short __uid_t __uint8_t __uint16_t __uint32_t __uint64_t __uint_least8_t __uint_least16_t __uint_least32_t __uint_least64_t __uintmax_t __useconds_t aot_section_list_t aot_section_t enlarge_memory_error_callback_t enlarge_memory_error_reason_t int_fast8_t int_fast16_t int_fast32_t int_fast64_t int_least8_t int_least16_t int_least32_t int_least64_t intmax_t log_level_t mem_alloc_type_t mem_alloc_usage_t module_destroyer Callback to release the buffer loaded by module_reader callback module_reader Callback to load a module file into a buffer in multi-module feature package_type_t uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t uint_least8_t uint_least16_t uint_least32_t uint_least64_t uintmax_t wasm_exec_env_t wasm_func_type_t wasm_function_inst_t wasm_global_type_t wasm_import_export_kind_t wasm_memory_inst_t wasm_memory_type_t wasm_module_inst_t wasm_module_t wasm_section_list_t wasm_shared_heap_t wasm_table_type_t wasm_thread_callback_t wasm_thread_t wasm_valkind_enum wasm_valkind_t MemAllocOption wasm_export_t__bindgen_ty_1 wasm_import_t__bindgen_ty_1 wasm_val_t__bindgen_ty_1