Crate wasmi_c_api

Source
Expand description

Implements C-API support for the Wasmi WebAssembly interpreter.

Namely implements the Wasm C-API proposal found here: https://github.com/WebAssembly/wasm-c-api/

§Crate features

§The prefix-symbols feature

Adds a wasmi_ prefix to all the public symbols. This means that, for example, the function wasm_store_delete will be given the public (not mangled) symbol wasmi_wasm_store_delete.

§Rationale

This feature allows users that need to separate multiple C-API implementers to segregate wasmi’s C-API symbols, avoiding symbol clashes.

§Note

It’s important to notice that when the prefix-symbols feature is enabled, the symbols declared in the C-API header are not given the prefix, introducing - by design, in order to keep the C-API header same as the actual specification - an asymmetry. For example, Rust users that want to enable this feature, can use bindgen to generate correct C-to-Rust interop code:

   #[derive(Debug)]
   struct WasmiRenamer {}

   impl ParseCallbacks for WasmiRenamer {
       /// This function will run for every extern variable and function. The returned value determines
       /// the link name in the bindings.
       fn generated_link_name_override(
           &self,
           item_info: bindgen::callbacks::ItemInfo<'_>,
       ) -> Option<String> {
           if item_info.name.starts_with("wasm") {
               let new_name = if cfg!(any(target_os = "macos", target_os = "ios")) {
                   format!("_wasmi_{}", item_info.name)
               } else {
                   format!("wasmi_{}", item_info.name)
               };

               Some(new_name)
           } else {
               None
           }
       }
   }

   let bindings = bindgen::Builder::default()
       .header(
           PathBuf::from(std::env::var("DEP_WASMI_C_API_INCLUDE").unwrap())
               .join("wasm.h")
               .to_string_lossy(),
       )
       .derive_default(true)
       .derive_debug(true)
       .parse_callbacks(Box::new(WasmiRenamer {}))
       .generate()
       .expect("Unable to generate bindings for `wasmi`!");

Re-exports§

pub use wasmi;

Structs§

WasmStoreRef
This representation of a Store is used to implement the wasm.h API (and not the wasmi.h API!)
WasmiStoreData
Extensional data stored by wasmi_store_t to handle foreign data and optional WASI support.
wasm_byte_vec_t
A Wasm compatible vector with element type u8.
wasm_config_t
The Wasm configuration.
wasm_engine_t
The Wasm execution engine.
wasm_exporttype_t
A Wasm export type.
wasm_exporttype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_exporttype_t>>.
wasm_extern_t
A Wasm external reference.
wasm_extern_vec_t
A Wasm compatible vector with element type Option<Box<wasm_extern_t>>.
wasm_externtype_t
A Wasm extern type.
wasm_externtype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_externtype_t>>.
wasm_foreign_t
A foreign defined non-Wasm object.
wasm_frame_t
A Wasm frame object.
wasm_frame_vec_t
A Wasm compatible vector with element type [Option<Box<wasm_frame_t<'a>>>].
wasm_func_t
A Wasm function.
wasm_functype_t
A Wasm function type.
wasm_functype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_functype_t>>.
wasm_global_t
A Wasm global variable.
wasm_globaltype_t
A Wasm global variable type.
wasm_globaltype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_globaltype_t>>.
wasm_importtype_t
A Wasm import type.
wasm_importtype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_importtype_t>>.
wasm_instance_t
A Wasm instance.
wasm_limits_t
Utility type representing minimum and maximum limitations for Wasm types.
wasm_memory_t
A Wasm linear memory.
wasm_memorytype_t
A Wasm linear memory type.
wasm_memorytype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_memorytype_t>>.
wasm_module_t
A Wasm module.
wasm_ref_t
*mut wasm_ref_t is a reference type (externref or funcref) for the C API.
wasm_shared_module_t
A shared Wasm module.
wasm_store_t
The Wasm store.
wasm_table_t
A Wasm table.
wasm_tabletype_t
A Wasm table type.
wasm_tabletype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_tabletype_t>>.
wasm_trap_t
A Wasm trap.
wasm_val_t
A Wasm value.
wasm_val_vec_t
A Wasm compatible vector with element type wasm_val_t.
wasm_valtype_t
A WebAssembly value type.
wasm_valtype_vec_t
A Wasm compatible vector with element type Option<Box<wasm_valtype_t>>.
wasmi_error_t
An error that may occur when operating with Wasmi.
wasmi_store_t
The Wasm store with foreign data and optional WASI support.

Enums§

wasm_externkind_t
The kind of a wasm_externtype_t.
wasm_mutability_t
The mutability of a wasm_globaltype_t.
wasm_valkind_t
The different kinds of wasm_valtype_t.
wasmi_compilation_mode_t
Compilation modes supported by the Wasmi execution engine.

Functions§

wasm_byte_vec_copy
Copies the wasm_byte_vec_t in src.
wasm_byte_vec_delete
Frees memory associated to the wasm_byte_vec_t.
wasm_byte_vec_new
Creates an new wasm_byte_vec_t with the given size and ptr data.
wasm_byte_vec_new_empty
Creates an empty wasm_byte_vec_t
wasm_byte_vec_new_uninitialized
Creates an uninitialized wasm_byte_vec_t with the given size.
wasm_config_delete
Deletes the wasm_config_t.
wasm_config_new
Creates a new default initialized wasm_config_t.
wasm_engine_delete
Deletes the wasm_engine_t.
wasm_engine_new
Creates a new default initialized wasm_engine_t.
wasm_engine_new_with_config
Creates a new wasm_engine_t initialized with a wasm_config_t.
wasm_exporttype_copy
Creates a new wasm_exporttype_t which matches the provided one.
wasm_exporttype_delete
Deletes the wasm_exporttype_t.
wasm_exporttype_name
Returns a shared reference to the name of the wasm_exporttype_t.
wasm_exporttype_new
Creates a new wasm_exporttype_t with the given name and extern type ty
wasm_exporttype_type
Returns a shared reference to the extern type of the wasm_exporttype_t.
wasm_exporttype_vec_copy
Copies the wasm_exporttype_vec_t in src.
wasm_exporttype_vec_delete
Frees memory associated to the wasm_exporttype_vec_t.
wasm_exporttype_vec_new
Creates an new wasm_exporttype_vec_t with the given size and ptr data.
wasm_exporttype_vec_new_empty
Creates an empty wasm_exporttype_vec_t
wasm_exporttype_vec_new_uninitialized
Creates an uninitialized wasm_exporttype_vec_t with the given size.
wasm_extern_as_func
Returns the wasm_extern_t as reference to mutable wasm_func_t if possible.
wasm_extern_as_func_const
Returns the wasm_extern_t as reference to shared wasm_func_t if possible.
wasm_extern_as_global
Returns the wasm_extern_t as reference to mutable wasm_global_t if possible.
wasm_extern_as_global_const
Returns the wasm_extern_t as reference to shared wasm_global_t if possible.
wasm_extern_as_memory
Returns the wasm_extern_t as reference to mutable wasm_memory_t if possible.
wasm_extern_as_memory_const
Returns the wasm_extern_t as reference to shared wasm_memory_t if possible.
wasm_extern_as_ref
Returns the wasm_extern_t as mutable reference.
wasm_extern_as_ref_const
Returns the wasm_extern_t as immutable reference.
wasm_extern_as_table
Returns the wasm_extern_t as reference to mutable wasm_table_t if possible.
wasm_extern_as_table_const
Returns the wasm_extern_t as reference to shared wasm_table_t if possible.
wasm_extern_copy
Creates a new wasm_extern_t which matches the provided one.
wasm_extern_delete
Deletes the wasm_extern_t.
wasm_extern_get_host_info
Returns the host information of the wasm_extern_t.
wasm_extern_kind
Returns the wasm_extern_kind of the wasm_extern_t.
wasm_extern_same
Returns true if the given references are pointing to the same wasm_extern_t.
wasm_extern_set_host_info
Sets the host information of the wasm_extern_t.
wasm_extern_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_extern_t.
wasm_extern_type
Returns the wasm_externtype_t of the wasm_extern_t.
wasm_extern_vec_copy
Copies the wasm_extern_vec_t in src.
wasm_extern_vec_delete
Frees memory associated to the wasm_extern_vec_t.
wasm_extern_vec_new
Creates an new wasm_extern_vec_t with the given size and ptr data.
wasm_extern_vec_new_empty
Creates an empty wasm_extern_vec_t
wasm_extern_vec_new_uninitialized
Creates an uninitialized wasm_extern_vec_t with the given size.
wasm_externtype_as_functype
Returns a mutable reference to the wasm_externtype_t as wasm_functype_t.
wasm_externtype_as_functype_const
Returns a shared reference to the wasm_externtype_t as wasm_functype_t.
wasm_externtype_as_globaltype
Returns a mutable reference to the wasm_externtype_t as wasm_globaltype_t.
wasm_externtype_as_globaltype_const
Returns a shared reference to the wasm_externtype_t as wasm_globaltype_t.
wasm_externtype_as_memorytype
Returns a mutable reference to the wasm_externtype_t as wasm_memorytype_t.
wasm_externtype_as_memorytype_const
Returns a shared reference to the wasm_externtype_t as wasm_memorytype_t.
wasm_externtype_as_tabletype
Returns a mutable reference to the wasm_externtype_t as wasm_tabletype_t.
wasm_externtype_as_tabletype_const
Returns a shared reference to the wasm_externtype_t as wasm_tabletype_t.
wasm_externtype_copy
Creates a new wasm_externtype_t which matches the provided one.
wasm_externtype_delete
Deletes the wasm_externtype_t.
wasm_externtype_kind
Returns the wasm_externkind_t of the wasm_externtype_t.
wasm_externtype_vec_copy
Copies the wasm_externtype_vec_t in src.
wasm_externtype_vec_delete
Frees memory associated to the wasm_externtype_vec_t.
wasm_externtype_vec_new
Creates an new wasm_externtype_vec_t with the given size and ptr data.
wasm_externtype_vec_new_empty
Creates an empty wasm_externtype_vec_t
wasm_externtype_vec_new_uninitialized
Creates an uninitialized wasm_externtype_vec_t with the given size.
wasm_foreign_as_ref
Returns the wasm_foreign_t as mutable reference.
wasm_foreign_as_ref_const
Returns the wasm_foreign_t as immutable reference.
wasm_foreign_copy
Creates a new wasm_foreign_t which matches the provided one.
wasm_foreign_delete
Deletes the wasm_foreign_t.
wasm_foreign_get_host_info
Returns the host information of the wasm_foreign_t.
wasm_foreign_new
Creates a new foreign non-Wasm object for the wasm_store_t.
wasm_foreign_same
Returns true if the given references are pointing to the same wasm_foreign_t.
wasm_foreign_set_host_info
Sets the host information of the wasm_foreign_t.
wasm_foreign_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_foreign_t.
wasm_frame_copy
Returns a copy of the wasm_frame_t.
wasm_frame_delete
Deletes the wasm_frame_t.
wasm_frame_func_index
Returns the function index of the wasm_frame_t.
wasm_frame_func_offset
Returns the function offset of the wasm_frame_t.
wasm_frame_instance
Returns the wasm_instance_t of the wasm_frame_t.
wasm_frame_module_offset
Returns the module offset of the wasm_frame_t.
wasm_frame_vec_copy
Copies the wasm_frame_vec_t in src.
wasm_frame_vec_delete
Frees memory associated to the wasm_frame_vec_t.
wasm_frame_vec_new
Creates an new wasm_frame_vec_t with the given size and ptr data.
wasm_frame_vec_new_empty
Creates an empty wasm_frame_vec_t
wasm_frame_vec_new_uninitialized
Creates an uninitialized wasm_frame_vec_t with the given size.
wasm_func_as_extern
Returns the wasm_func_t as mutable reference to wasm_extern_t.
wasm_func_as_extern_const
Returns the wasm_func_t as shared reference to wasm_extern_t.
wasm_func_as_ref
Returns the wasm_func_t as mutable reference.
wasm_func_as_ref_const
Returns the wasm_func_t as immutable reference.
wasm_func_call
Calls the wasm_func_t with the given params and stores the result in results.
wasm_func_copy
Creates a new wasm_func_t which matches the provided one.
wasm_func_delete
Deletes the wasm_func_t.
wasm_func_get_host_info
Returns the host information of the wasm_func_t.
wasm_func_new
Creates a new wasm_func_t of type wasm_functype_t for the wasm_store_t.
wasm_func_new_with_env
Creates a new wasm_func_t of type wasm_functype_t for the wasm_store_t.
wasm_func_param_arity
Returns the number of parameter types of the wasm_func_t.
wasm_func_result_arity
Returns the number of result types of the wasm_func_t.
wasm_func_same
Returns true if the given references are pointing to the same wasm_func_t.
wasm_func_set_host_info
Sets the host information of the wasm_func_t.
wasm_func_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_func_t.
wasm_func_type
Returns the wasm_functype_t of the wasm_func_t.
wasm_functype_as_externtype
Returns a mutable reference to the element type of wasm_functype_t as wasm_externtype_t.
wasm_functype_as_externtype_const
Returns a shared reference to the element type of wasm_functype_t as wasm_externtype_t.
wasm_functype_copy
Creates a new wasm_functype_t which matches the provided one.
wasm_functype_delete
Deletes the wasm_functype_t.
wasm_functype_new
Creates a new wasm_functype_t from the given parameter and result types.
wasm_functype_params
Returns a shared reference to the parameter types of the wasm_functype_t.
wasm_functype_results
Returns a shared reference to the result types of the wasm_functype_t.
wasm_functype_vec_copy
Copies the wasm_functype_vec_t in src.
wasm_functype_vec_delete
Frees memory associated to the wasm_functype_vec_t.
wasm_functype_vec_new
Creates an new wasm_functype_vec_t with the given size and ptr data.
wasm_functype_vec_new_empty
Creates an empty wasm_functype_vec_t
wasm_functype_vec_new_uninitialized
Creates an uninitialized wasm_functype_vec_t with the given size.
wasm_global_as_extern
Returns the wasm_global_t as mutable reference to wasm_extern_t.
wasm_global_as_extern_const
Returns the wasm_global_t as shared reference to wasm_extern_t.
wasm_global_as_ref
Returns the wasm_global_t as mutable reference.
wasm_global_as_ref_const
Returns the wasm_global_t as immutable reference.
wasm_global_copy
Creates a new wasm_global_t which matches the provided one.
wasm_global_delete
Deletes the wasm_global_t.
wasm_global_get
Returns the current value of the wasm_global_t.
wasm_global_get_host_info
Returns the host information of the wasm_global_t.
wasm_global_new
Creates a new wasm_global_t from the given wasm_globaltype_t and wasm_val_t.
wasm_global_same
Returns true if the given references are pointing to the same wasm_global_t.
wasm_global_set
Sets the current value of the wasm_global_t.
wasm_global_set_host_info
Sets the host information of the wasm_global_t.
wasm_global_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_global_t.
wasm_global_type
Returns the wasm_globaltype_t of the wasm_global_t.
wasm_globaltype_as_externtype
Returns a mutable reference to the element type of wasm_globaltype_t as wasm_externtype_t.
wasm_globaltype_as_externtype_const
Returns a shared reference to the element type of wasm_globaltype_t as wasm_externtype_t.
wasm_globaltype_content
Returns a shared reference to the content type of the wasm_globaltype_t.
wasm_globaltype_copy
Creates a new wasm_globaltype_t which matches the provided one.
wasm_globaltype_delete
Deletes the wasm_globaltype_t.
wasm_globaltype_mutability
Returns the mutability of the wasm_globaltype_t.
wasm_globaltype_new
Creates a new wasm_globaltype_t with the given content type and mutability.
wasm_globaltype_vec_copy
Copies the wasm_globaltype_vec_t in src.
wasm_globaltype_vec_delete
Frees memory associated to the wasm_globaltype_vec_t.
wasm_globaltype_vec_new
Creates an new wasm_globaltype_vec_t with the given size and ptr data.
wasm_globaltype_vec_new_empty
Creates an empty wasm_globaltype_vec_t
wasm_globaltype_vec_new_uninitialized
Creates an uninitialized wasm_globaltype_vec_t with the given size.
wasm_importtype_copy
Creates a new wasm_importtype_t which matches the provided one.
wasm_importtype_delete
Deletes the wasm_importtype_t.
wasm_importtype_module
Returns a shared reference to the module namespace of the wasm_importtype_t.
wasm_importtype_name
Returns a shared reference to the name namespace of the wasm_importtype_t.
wasm_importtype_new
Creates a new wasm_importtype_t from the given module and name namespace and extern type ty.
wasm_importtype_type
Returns a shared reference to the extern type of the wasm_importtype_t.
wasm_importtype_vec_copy
Copies the wasm_importtype_vec_t in src.
wasm_importtype_vec_delete
Frees memory associated to the wasm_importtype_vec_t.
wasm_importtype_vec_new
Creates an new wasm_importtype_vec_t with the given size and ptr data.
wasm_importtype_vec_new_empty
Creates an empty wasm_importtype_vec_t
wasm_importtype_vec_new_uninitialized
Creates an uninitialized wasm_importtype_vec_t with the given size.
wasm_instance_as_ref
Returns the wasm_instance_t as mutable reference.
wasm_instance_as_ref_const
Returns the wasm_instance_t as immutable reference.
wasm_instance_copy
Creates a new wasm_instance_t which matches the provided one.
wasm_instance_delete
Deletes the wasm_instance_t.
wasm_instance_exports
Returns the exports of the wasm_instance_t.
wasm_instance_get_host_info
Returns the host information of the wasm_instance_t.
wasm_instance_new
Instantiates the wasm_module_t with the given list of imports.
wasm_instance_same
Returns true if the given references are pointing to the same wasm_instance_t.
wasm_instance_set_host_info
Sets the host information of the wasm_instance_t.
wasm_instance_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_instance_t.
wasm_memory_as_extern
Returns the wasm_memory_t as mutable reference to wasm_extern_t.
wasm_memory_as_extern_const
Returns the wasm_memory_t as shared reference to wasm_extern_t.
wasm_memory_as_ref
Returns the wasm_memory_t as mutable reference.
wasm_memory_as_ref_const
Returns the wasm_memory_t as immutable reference.
wasm_memory_copy
Creates a new wasm_memory_t which matches the provided one.
wasm_memory_data
Returns the underlying data pointer of the wasm_memory_t.
wasm_memory_data_size
Returns the data buffer size of the wasm_memory_t.
wasm_memory_delete
Deletes the wasm_memory_t.
wasm_memory_get_host_info
Returns the host information of the wasm_memory_t.
wasm_memory_grow
Grows the wasm_memory_t by delta Wasm pages.
wasm_memory_new
Creates a new wasm_memory_t from the given wasm_memorytype_t.
wasm_memory_same
Returns true if the given references are pointing to the same wasm_memory_t.
wasm_memory_set_host_info
Sets the host information of the wasm_memory_t.
wasm_memory_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_memory_t.
wasm_memory_size
Returns the current number of Wasm pages of the wasm_memory_t.
wasm_memory_type
Returns the wasm_memorytype_t of the wasm_memory_t.
wasm_memorytype_as_externtype
Returns a mutable reference to the element type of wasm_memorytype_t as wasm_externtype_t.
wasm_memorytype_as_externtype_const
Returns a shared reference to the element type of wasm_memorytype_t as wasm_externtype_t.
wasm_memorytype_copy
Creates a new wasm_memorytype_t which matches the provided one.
wasm_memorytype_delete
Deletes the wasm_memorytype_t.
wasm_memorytype_limits
Returns a shared reference to the table limits of the wasm_memorytype_t.
wasm_memorytype_new
Creates a new wasm_memorytype_t with the given limits.
wasm_memorytype_vec_copy
Copies the wasm_memorytype_vec_t in src.
wasm_memorytype_vec_delete
Frees memory associated to the wasm_memorytype_vec_t.
wasm_memorytype_vec_new
Creates an new wasm_memorytype_vec_t with the given size and ptr data.
wasm_memorytype_vec_new_empty
Creates an empty wasm_memorytype_vec_t
wasm_memorytype_vec_new_uninitialized
Creates an uninitialized wasm_memorytype_vec_t with the given size.
wasm_module_as_ref
Returns the wasm_module_t as mutable reference.
wasm_module_as_ref_const
Returns the wasm_module_t as immutable reference.
wasm_module_copy
Creates a new wasm_module_t which matches the provided one.
wasm_module_delete
Deletes the wasm_module_t.
wasm_module_deserialize
Deserializes the binary as a wasm_module_t.
wasm_module_exports
Queries the module exports of the wasm_module_t.
wasm_module_get_host_info
Returns the host information of the wasm_module_t.
wasm_module_imports
Queries the module imports of the wasm_module_t.
wasm_module_new
Creates a new wasm_module_t for store from the given Wasm binary.
wasm_module_obtain
Obtains the wasm_module_t from the wasm_shared_module_t.
wasm_module_same
Returns true if the given references are pointing to the same wasm_module_t.
wasm_module_serialize
Serializes the wasm_module_t into a binary.
wasm_module_set_host_info
Sets the host information of the wasm_module_t.
wasm_module_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_module_t.
wasm_module_share
Shares the module and returns a shared image as wasm_shared_module_t.
wasm_module_validate
Returns true if the Wasm binary successfully validates.
wasm_ref_as_extern
Returns the wasm_ref_t as shared wasm_extern_t if possible or otherwise returns None.
wasm_ref_as_extern_const
Returns the wasm_ref_t as mutable wasm_extern_t if possible or otherwise returns None.
wasm_ref_as_foreign
Returns the wasm_ref_t as shared wasm_foreign_t if possible or otherwise returns None.
wasm_ref_as_foreign_const
Returns the wasm_ref_t as mutable wasm_foreign_t if possible or otherwise returns None.
wasm_ref_as_func
Returns the wasm_ref_t as shared wasm_func_t if possible or otherwise returns None.
wasm_ref_as_func_const
Returns the wasm_ref_t as mutable wasm_func_t if possible or otherwise returns None.
wasm_ref_as_global
Returns the wasm_ref_t as shared wasm_global_t if possible or otherwise returns None.
wasm_ref_as_global_const
Returns the wasm_ref_t as mutable wasm_global_t if possible or otherwise returns None.
wasm_ref_as_instance
Returns the wasm_ref_t as shared wasm_instance_t if possible or otherwise returns None.
wasm_ref_as_instance_const
Returns the wasm_ref_t as mutable wasm_instance_t if possible or otherwise returns None.
wasm_ref_as_memory
Returns the wasm_ref_t as shared wasm_memory_t if possible or otherwise returns None.
wasm_ref_as_memory_const
Returns the wasm_ref_t as mutable wasm_memory_t if possible or otherwise returns None.
wasm_ref_as_module
Returns the wasm_ref_t as shared wasm_module_t if possible or otherwise returns None.
wasm_ref_as_module_const
Returns the wasm_ref_t as mutable wasm_module_t if possible or otherwise returns None.
wasm_ref_as_table
Returns the wasm_ref_t as shared wasm_table_t if possible or otherwise returns None.
wasm_ref_as_table_const
Returns the wasm_ref_t as mutable wasm_table_t if possible or otherwise returns None.
wasm_ref_as_trap
Returns the wasm_ref_t as shared wasm_trap_t if possible or otherwise returns None.
wasm_ref_as_trap_const
Returns the wasm_ref_t as mutable wasm_trap_t if possible or otherwise returns None.
wasm_ref_copy
Copies the wasm_ref_t and returns the copied reference.
wasm_ref_delete
Deletes the wasm_ref_t.
wasm_ref_get_host_info
Returns the host information of the wasm_ref_t.
wasm_ref_same
Returns true if both wasm_ref_t references are referencing the same objects.
wasm_ref_set_host_info
Sets the host information of the wasm_ref_t to info.
wasm_ref_set_host_info_with_finalizer
Sets the host information of the wasm_ref_t to info with the associated finalizer.
wasm_shared_module_delete
Deletes the wasm_shared_module_t.
wasm_store_delete
Deletes the wasm_store_t.
wasm_store_new
Creates a new Store<()> for the given engine.
wasm_table_as_extern
Returns the wasm_table_t as mutable reference to wasm_extern_t.
wasm_table_as_extern_const
Returns the wasm_table_t as shared reference to wasm_extern_t.
wasm_table_as_ref
Returns the wasm_table_t as mutable reference.
wasm_table_as_ref_const
Returns the wasm_table_t as immutable reference.
wasm_table_copy
Creates a new wasm_table_t which matches the provided one.
wasm_table_delete
Deletes the wasm_table_t.
wasm_table_get
Returns the element at index of wasm_table_t t.
wasm_table_get_host_info
Returns the host information of the wasm_table_t.
wasm_table_grow
Grows the number of cells of the wasm_table_t by delta.
wasm_table_new
Creates a new wasm_table_t from the given wasm_tabletype_t.
wasm_table_same
Returns true if the given references are pointing to the same wasm_table_t.
wasm_table_set
Sets the value of the element at index of wasm_table_t to new_value.
wasm_table_set_host_info
Sets the host information of the wasm_table_t.
wasm_table_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_table_t.
wasm_table_size
Returns the number of cells of the wasm_table_t.
wasm_table_type
Returns the wasm_tabletype_t of the wasm_table_t.
wasm_tabletype_as_externtype
Returns a mutable reference to the element type of wasm_tabletype_t as wasm_externtype_t.
wasm_tabletype_as_externtype_const
Returns a shared reference to the element type of wasm_tabletype_t as wasm_externtype_t.
wasm_tabletype_copy
Creates a new wasm_tabletype_t which matches the provided one.
wasm_tabletype_delete
Deletes the wasm_tabletype_t.
wasm_tabletype_element
Returns a shared reference to the element type of the wasm_tabletype_t.
wasm_tabletype_limits
Returns a shared reference to the table limits of the wasm_tabletype_t.
wasm_tabletype_new
Creates a new wasm_tabletype_t with the element ty and limits.
wasm_tabletype_vec_copy
Copies the wasm_tabletype_vec_t in src.
wasm_tabletype_vec_delete
Frees memory associated to the wasm_tabletype_vec_t.
wasm_tabletype_vec_new
Creates an new wasm_tabletype_vec_t with the given size and ptr data.
wasm_tabletype_vec_new_empty
Creates an empty wasm_tabletype_vec_t
wasm_tabletype_vec_new_uninitialized
Creates an uninitialized wasm_tabletype_vec_t with the given size.
wasm_trap_as_ref
Returns the wasm_trap_t as mutable reference.
wasm_trap_as_ref_const
Returns the wasm_trap_t as immutable reference.
wasm_trap_copy
Creates a new wasm_trap_t which matches the provided one.
wasm_trap_delete
Deletes the wasm_trap_t.
wasm_trap_get_host_info
Returns the host information of the wasm_trap_t.
wasm_trap_message
Returns the error message of the wasm_trap_t.
wasm_trap_new
Creates a new wasm_trap_t for the wasm_store_t with the given message.
wasm_trap_origin
Returns the origin of the wasm_trap_t if any.
wasm_trap_same
Returns true if the given references are pointing to the same wasm_trap_t.
wasm_trap_set_host_info
Sets the host information of the wasm_trap_t.
wasm_trap_set_host_info_with_finalizer
Sets the host information finalizer of the wasm_trap_t.
wasm_trap_trace
Returns the trace of the wasm_trap_t.
wasm_val_copy
Copies the wasm_val_t and stores the result in out.
wasm_val_delete
Deletes the wasm_val_t.
wasm_val_vec_copy
Copies the wasm_val_vec_t in src.
wasm_val_vec_delete
Frees memory associated to the wasm_val_vec_t.
wasm_val_vec_new
Creates an new wasm_val_vec_t with the given size and ptr data.
wasm_val_vec_new_empty
Creates an empty wasm_val_vec_t
wasm_val_vec_new_uninitialized
Creates an uninitialized wasm_val_vec_t with the given size.
wasm_valtype_copy
Creates a new wasm_valtype_t which matches the provided one.
wasm_valtype_delete
Deletes the wasm_valtype_t.
wasm_valtype_kind
Returns the wasm_valkind_t of the wasm_valtype_t.
wasm_valtype_new
Creates a new owned wasm_valtype_t from the wasm_valkind_t.
wasm_valtype_vec_copy
Copies the wasm_valtype_vec_t in src.
wasm_valtype_vec_delete
Frees memory associated to the wasm_valtype_vec_t.
wasm_valtype_vec_new
Creates an new wasm_valtype_vec_t with the given size and ptr data.
wasm_valtype_vec_new_empty
Creates an empty wasm_valtype_vec_t
wasm_valtype_vec_new_uninitialized
Creates an uninitialized wasm_valtype_vec_t with the given size.
wasmi_config_compilation_mode_set
Sets the compilation mode for the config.
wasmi_config_consume_fuel_set
Enables or disables fuel consumption for the config.
wasmi_config_floats_set
Enables or disables support for floating point numbers for the config.
wasmi_config_ignore_custom_sections_set
Enables or disables processing of Wasm custom sections.
wasmi_config_wasm_bulk_memory_set
Enables or disables support for the Wasm bulk-memory-operations proposal.
wasmi_config_wasm_extended_const_set
Enables or disables support for the Wasm extended-const proposal.
wasmi_config_wasm_multi_value_set
Enables or disables support for the Wasm multi-value proposal.
wasmi_config_wasm_mutable_globals_set
Enables or disables support for the Wasm mutable-global proposal.
wasmi_config_wasm_reference_types_set
Enables or disables support for the Wasm reference-types proposal.
wasmi_config_wasm_saturating_float_to_int_set
Enables or disables support for the Wasm nontrapping-float-to-int-conversions proposal.
wasmi_config_wasm_sign_extension_set
Enables or disables support for the Wasm sign-extension-ops proposal.
wasmi_config_wasm_tail_call_set
Enables or disables support for the Wasm tail-call proposal.
wasmi_context_get_data
Returns a pointer to the foreign data of the Wasmi store context.
wasmi_context_get_fuel
Returns the current fuel of the Wasmi store context in fuel.
wasmi_context_set_data
Sets the foreign data of the Wasmi store context.
wasmi_context_set_fuel
Sets the current fuel of the Wasmi store context to fuel.
wasmi_engine_clone
Clones a wasm_engine_t.
wasmi_error_delete
Deletes the wasmi_error_t.
wasmi_error_new
Creates a new wasmi_error_t with the given error message.
wasmi_store_context
Returns mutable access to the store context of the wasmi_store_t.
wasmi_store_delete
Deletes the wasmi_store_t.
wasmi_store_new
Creates a new Store<()> for the given engine.
wasmi_trap_new
Creates a new wasm_trap_t from the given message and len pair.

Type Aliases§

wasm_func_callback_t
A Wasm host function callback.
wasm_func_callback_with_env_t
A Wasm host function callback with access to environmental data.
wasm_memory_pages_t
Type specifying the number of pages of a Wasm linear memory.
wasm_message_t
A Wasm error message string buffer.
wasm_name_t
A Wasm name string buffer.
wasm_table_size_t
Type specifying the number of cells of a Wasm table.

Unions§

wasm_val_union
The underlying data of a wasm_val_t.