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§
- Wasm
Store Ref - This representation of a
Storeis used to implement thewasm.hAPI (and not thewasmi.hAPI!) - Wasmi
Store Data - Extensional data stored by
wasmi_store_tto 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_tis a reference type (externreforfuncref) 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_tinsrc. - wasm_
byte_ vec_ delete - Frees memory associated to the
wasm_byte_vec_t. - wasm_
byte_ ⚠vec_ new - Creates an new
wasm_byte_vec_twith the givensizeandptrdata. - wasm_
byte_ vec_ new_ empty - Creates an empty
wasm_byte_vec_t - wasm_
byte_ vec_ new_ uninitialized - Creates an uninitialized
wasm_byte_vec_twith the givensize. - 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_tinitialized with awasm_config_t. - wasm_
exporttype_ copy - Creates a new
wasm_exporttype_twhich 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_twith the givennameand extern typety - 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_tinsrc. - wasm_
exporttype_ vec_ delete - Frees memory associated to the
wasm_exporttype_vec_t. - wasm_
exporttype_ ⚠vec_ new - Creates an new
wasm_exporttype_vec_twith the givensizeandptrdata. - wasm_
exporttype_ vec_ new_ empty - Creates an empty
wasm_exporttype_vec_t - wasm_
exporttype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_exporttype_vec_twith the givensize. - wasm_
extern_ as_ func - Returns the
wasm_extern_tas reference to mutablewasm_func_tif possible. - wasm_
extern_ as_ func_ const - Returns the
wasm_extern_tas reference to sharedwasm_func_tif possible. - wasm_
extern_ as_ global - Returns the
wasm_extern_tas reference to mutablewasm_global_tif possible. - wasm_
extern_ as_ global_ const - Returns the
wasm_extern_tas reference to sharedwasm_global_tif possible. - wasm_
extern_ as_ memory - Returns the
wasm_extern_tas reference to mutablewasm_memory_tif possible. - wasm_
extern_ as_ memory_ const - Returns the
wasm_extern_tas reference to sharedwasm_memory_tif possible. - wasm_
extern_ as_ ref - Returns the
wasm_extern_tas mutable reference. - wasm_
extern_ as_ ref_ const - Returns the
wasm_extern_tas immutable reference. - wasm_
extern_ as_ table - Returns the
wasm_extern_tas reference to mutablewasm_table_tif possible. - wasm_
extern_ as_ table_ const - Returns the
wasm_extern_tas reference to sharedwasm_table_tif possible. - wasm_
extern_ copy - Creates a new
wasm_extern_twhich 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_kindof thewasm_extern_t. - wasm_
extern_ same - Returns
trueif the given references are pointing to the samewasm_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_tof thewasm_extern_t. - wasm_
extern_ vec_ copy - Copies the
wasm_extern_vec_tinsrc. - wasm_
extern_ vec_ delete - Frees memory associated to the
wasm_extern_vec_t. - wasm_
extern_ ⚠vec_ new - Creates an new
wasm_extern_vec_twith the givensizeandptrdata. - wasm_
extern_ vec_ new_ empty - Creates an empty
wasm_extern_vec_t - wasm_
extern_ vec_ new_ uninitialized - Creates an uninitialized
wasm_extern_vec_twith the givensize. - wasm_
externtype_ as_ functype - Returns a mutable reference to the
wasm_externtype_taswasm_functype_t. - wasm_
externtype_ as_ functype_ const - Returns a shared reference to the
wasm_externtype_taswasm_functype_t. - wasm_
externtype_ as_ globaltype - Returns a mutable reference to the
wasm_externtype_taswasm_globaltype_t. - wasm_
externtype_ as_ globaltype_ const - Returns a shared reference to the
wasm_externtype_taswasm_globaltype_t. - wasm_
externtype_ as_ memorytype - Returns a mutable reference to the
wasm_externtype_taswasm_memorytype_t. - wasm_
externtype_ as_ memorytype_ const - Returns a shared reference to the
wasm_externtype_taswasm_memorytype_t. - wasm_
externtype_ as_ tabletype - Returns a mutable reference to the
wasm_externtype_taswasm_tabletype_t. - wasm_
externtype_ as_ tabletype_ const - Returns a shared reference to the
wasm_externtype_taswasm_tabletype_t. - wasm_
externtype_ copy - Creates a new
wasm_externtype_twhich matches the provided one. - wasm_
externtype_ delete - Deletes the
wasm_externtype_t. - wasm_
externtype_ kind - Returns the
wasm_externkind_tof thewasm_externtype_t. - wasm_
externtype_ vec_ copy - Copies the
wasm_externtype_vec_tinsrc. - wasm_
externtype_ vec_ delete - Frees memory associated to the
wasm_externtype_vec_t. - wasm_
externtype_ ⚠vec_ new - Creates an new
wasm_externtype_vec_twith the givensizeandptrdata. - wasm_
externtype_ vec_ new_ empty - Creates an empty
wasm_externtype_vec_t - wasm_
externtype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_externtype_vec_twith the givensize. - wasm_
foreign_ as_ ref - Returns the
wasm_foreign_tas mutable reference. - wasm_
foreign_ as_ ref_ const - Returns the
wasm_foreign_tas immutable reference. - wasm_
foreign_ copy - Creates a new
wasm_foreign_twhich 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
trueif the given references are pointing to the samewasm_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_tof thewasm_frame_t. - wasm_
frame_ module_ offset - Returns the module offset of the
wasm_frame_t. - wasm_
frame_ vec_ copy - Copies the
wasm_frame_vec_tinsrc. - wasm_
frame_ vec_ delete - Frees memory associated to the
wasm_frame_vec_t. - wasm_
frame_ ⚠vec_ new - Creates an new
wasm_frame_vec_twith the givensizeandptrdata. - wasm_
frame_ vec_ new_ empty - Creates an empty
wasm_frame_vec_t - wasm_
frame_ vec_ new_ uninitialized - Creates an uninitialized
wasm_frame_vec_twith the givensize. - wasm_
func_ as_ extern - Returns the
wasm_func_tas mutable reference towasm_extern_t. - wasm_
func_ as_ extern_ const - Returns the
wasm_func_tas shared reference towasm_extern_t. - wasm_
func_ as_ ref - Returns the
wasm_func_tas mutable reference. - wasm_
func_ as_ ref_ const - Returns the
wasm_func_tas immutable reference. - wasm_
func_ ⚠call - Calls the
wasm_func_twith the givenparamsand stores the result inresults. - wasm_
func_ copy - Creates a new
wasm_func_twhich 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_tof typewasm_functype_tfor thewasm_store_t. - wasm_
func_ ⚠new_ with_ env - Creates a new
wasm_func_tof typewasm_functype_tfor thewasm_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
trueif the given references are pointing to the samewasm_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_tof thewasm_func_t. - wasm_
functype_ as_ externtype - Returns a mutable reference to the element type of
wasm_functype_taswasm_externtype_t. - wasm_
functype_ as_ externtype_ const - Returns a shared reference to the element type of
wasm_functype_taswasm_externtype_t. - wasm_
functype_ copy - Creates a new
wasm_functype_twhich matches the provided one. - wasm_
functype_ delete - Deletes the
wasm_functype_t. - wasm_
functype_ new - Creates a new
wasm_functype_tfrom 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_tinsrc. - wasm_
functype_ vec_ delete - Frees memory associated to the
wasm_functype_vec_t. - wasm_
functype_ ⚠vec_ new - Creates an new
wasm_functype_vec_twith the givensizeandptrdata. - wasm_
functype_ vec_ new_ empty - Creates an empty
wasm_functype_vec_t - wasm_
functype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_functype_vec_twith the givensize. - wasm_
global_ as_ extern - Returns the
wasm_global_tas mutable reference towasm_extern_t. - wasm_
global_ as_ extern_ const - Returns the
wasm_global_tas shared reference towasm_extern_t. - wasm_
global_ as_ ref - Returns the
wasm_global_tas mutable reference. - wasm_
global_ as_ ref_ const - Returns the
wasm_global_tas immutable reference. - wasm_
global_ copy - Creates a new
wasm_global_twhich 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_tfrom the givenwasm_globaltype_tandwasm_val_t. - wasm_
global_ same - Returns
trueif the given references are pointing to the samewasm_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_tof thewasm_global_t. - wasm_
globaltype_ as_ externtype - Returns a mutable reference to the element type of
wasm_globaltype_taswasm_externtype_t. - wasm_
globaltype_ as_ externtype_ const - Returns a shared reference to the element type of
wasm_globaltype_taswasm_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_twhich 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_twith the given content type and mutability. - wasm_
globaltype_ vec_ copy - Copies the
wasm_globaltype_vec_tinsrc. - wasm_
globaltype_ vec_ delete - Frees memory associated to the
wasm_globaltype_vec_t. - wasm_
globaltype_ ⚠vec_ new - Creates an new
wasm_globaltype_vec_twith the givensizeandptrdata. - wasm_
globaltype_ vec_ new_ empty - Creates an empty
wasm_globaltype_vec_t - wasm_
globaltype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_globaltype_vec_twith the givensize. - wasm_
importtype_ copy - Creates a new
wasm_importtype_twhich 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_tfrom the givenmoduleandnamenamespace and extern typety. - 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_tinsrc. - wasm_
importtype_ vec_ delete - Frees memory associated to the
wasm_importtype_vec_t. - wasm_
importtype_ ⚠vec_ new - Creates an new
wasm_importtype_vec_twith the givensizeandptrdata. - wasm_
importtype_ vec_ new_ empty - Creates an empty
wasm_importtype_vec_t - wasm_
importtype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_importtype_vec_twith the givensize. - wasm_
instance_ as_ ref - Returns the
wasm_instance_tas mutable reference. - wasm_
instance_ as_ ref_ const - Returns the
wasm_instance_tas immutable reference. - wasm_
instance_ copy - Creates a new
wasm_instance_twhich 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_twith the given list ofimports. - wasm_
instance_ same - Returns
trueif the given references are pointing to the samewasm_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_tas mutable reference towasm_extern_t. - wasm_
memory_ as_ extern_ const - Returns the
wasm_memory_tas shared reference towasm_extern_t. - wasm_
memory_ as_ ref - Returns the
wasm_memory_tas mutable reference. - wasm_
memory_ as_ ref_ const - Returns the
wasm_memory_tas immutable reference. - wasm_
memory_ copy - Creates a new
wasm_memory_twhich 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_tbydeltaWasm pages. - wasm_
memory_ ⚠new - Creates a new
wasm_memory_tfrom the givenwasm_memorytype_t. - wasm_
memory_ same - Returns
trueif the given references are pointing to the samewasm_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_tof thewasm_memory_t. - wasm_
memorytype_ as_ externtype - Returns a mutable reference to the element type of
wasm_memorytype_taswasm_externtype_t. - wasm_
memorytype_ as_ externtype_ const - Returns a shared reference to the element type of
wasm_memorytype_taswasm_externtype_t. - wasm_
memorytype_ copy - Creates a new
wasm_memorytype_twhich 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_twith the givenlimits. - wasm_
memorytype_ vec_ copy - Copies the
wasm_memorytype_vec_tinsrc. - wasm_
memorytype_ vec_ delete - Frees memory associated to the
wasm_memorytype_vec_t. - wasm_
memorytype_ ⚠vec_ new - Creates an new
wasm_memorytype_vec_twith the givensizeandptrdata. - wasm_
memorytype_ vec_ new_ empty - Creates an empty
wasm_memorytype_vec_t - wasm_
memorytype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_memorytype_vec_twith the givensize. - wasm_
module_ as_ ref - Returns the
wasm_module_tas mutable reference. - wasm_
module_ as_ ref_ const - Returns the
wasm_module_tas immutable reference. - wasm_
module_ copy - Creates a new
wasm_module_twhich 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_tforstorefrom the given Wasmbinary. - wasm_
module_ ⚠obtain - Obtains the
wasm_module_tfrom thewasm_shared_module_t. - wasm_
module_ same - Returns
trueif the given references are pointing to the samewasm_module_t. - wasm_
module_ serialize - Serializes the
wasm_module_tinto 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
moduleand returns a shared image aswasm_shared_module_t. - wasm_
module_ ⚠validate - Returns
trueif the Wasmbinarysuccessfully validates. - wasm_
ref_ as_ extern - Returns the
wasm_ref_tas sharedwasm_extern_tif possible or otherwise returnsNone. - wasm_
ref_ as_ extern_ const - Returns the
wasm_ref_tas mutablewasm_extern_tif possible or otherwise returnsNone. - wasm_
ref_ as_ foreign - Returns the
wasm_ref_tas sharedwasm_foreign_tif possible or otherwise returnsNone. - wasm_
ref_ as_ foreign_ const - Returns the
wasm_ref_tas mutablewasm_foreign_tif possible or otherwise returnsNone. - wasm_
ref_ as_ func - Returns the
wasm_ref_tas sharedwasm_func_tif possible or otherwise returnsNone. - wasm_
ref_ as_ func_ const - Returns the
wasm_ref_tas mutablewasm_func_tif possible or otherwise returnsNone. - wasm_
ref_ as_ global - Returns the
wasm_ref_tas sharedwasm_global_tif possible or otherwise returnsNone. - wasm_
ref_ as_ global_ const - Returns the
wasm_ref_tas mutablewasm_global_tif possible or otherwise returnsNone. - wasm_
ref_ as_ instance - Returns the
wasm_ref_tas sharedwasm_instance_tif possible or otherwise returnsNone. - wasm_
ref_ as_ instance_ const - Returns the
wasm_ref_tas mutablewasm_instance_tif possible or otherwise returnsNone. - wasm_
ref_ as_ memory - Returns the
wasm_ref_tas sharedwasm_memory_tif possible or otherwise returnsNone. - wasm_
ref_ as_ memory_ const - Returns the
wasm_ref_tas mutablewasm_memory_tif possible or otherwise returnsNone. - wasm_
ref_ as_ module - Returns the
wasm_ref_tas sharedwasm_module_tif possible or otherwise returnsNone. - wasm_
ref_ as_ module_ const - Returns the
wasm_ref_tas mutablewasm_module_tif possible or otherwise returnsNone. - wasm_
ref_ as_ table - Returns the
wasm_ref_tas sharedwasm_table_tif possible or otherwise returnsNone. - wasm_
ref_ as_ table_ const - Returns the
wasm_ref_tas mutablewasm_table_tif possible or otherwise returnsNone. - wasm_
ref_ as_ trap - Returns the
wasm_ref_tas sharedwasm_trap_tif possible or otherwise returnsNone. - wasm_
ref_ as_ trap_ const - Returns the
wasm_ref_tas mutablewasm_trap_tif possible or otherwise returnsNone. - wasm_
ref_ copy - Copies the
wasm_ref_tand 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
trueif bothwasm_ref_treferences are referencing the same objects. - wasm_
ref_ set_ host_ info - Sets the host information of the
wasm_ref_ttoinfo. - wasm_
ref_ set_ host_ info_ with_ finalizer - Sets the host information of the
wasm_ref_ttoinfowith the associatedfinalizer. - 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 givenengine. - wasm_
table_ as_ extern - Returns the
wasm_table_tas mutable reference towasm_extern_t. - wasm_
table_ as_ extern_ const - Returns the
wasm_table_tas shared reference towasm_extern_t. - wasm_
table_ as_ ref - Returns the
wasm_table_tas mutable reference. - wasm_
table_ as_ ref_ const - Returns the
wasm_table_tas immutable reference. - wasm_
table_ copy - Creates a new
wasm_table_twhich matches the provided one. - wasm_
table_ delete - Deletes the
wasm_table_t. - wasm_
table_ ⚠get - Returns the element at
indexofwasm_table_tt. - 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_tbydelta. - wasm_
table_ ⚠new - Creates a new
wasm_table_tfrom the givenwasm_tabletype_t. - wasm_
table_ same - Returns
trueif the given references are pointing to the samewasm_table_t. - wasm_
table_ ⚠set - Sets the value of the element at
indexofwasm_table_ttonew_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_tof thewasm_table_t. - wasm_
tabletype_ as_ externtype - Returns a mutable reference to the element type of
wasm_tabletype_taswasm_externtype_t. - wasm_
tabletype_ as_ externtype_ const - Returns a shared reference to the element type of
wasm_tabletype_taswasm_externtype_t. - wasm_
tabletype_ copy - Creates a new
wasm_tabletype_twhich 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_twith the elementtyandlimits. - wasm_
tabletype_ vec_ copy - Copies the
wasm_tabletype_vec_tinsrc. - wasm_
tabletype_ vec_ delete - Frees memory associated to the
wasm_tabletype_vec_t. - wasm_
tabletype_ ⚠vec_ new - Creates an new
wasm_tabletype_vec_twith the givensizeandptrdata. - wasm_
tabletype_ vec_ new_ empty - Creates an empty
wasm_tabletype_vec_t - wasm_
tabletype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_tabletype_vec_twith the givensize. - wasm_
trap_ as_ ref - Returns the
wasm_trap_tas mutable reference. - wasm_
trap_ as_ ref_ const - Returns the
wasm_trap_tas immutable reference. - wasm_
trap_ copy - Creates a new
wasm_trap_twhich 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_tfor thewasm_store_twith the givenmessage. - wasm_
trap_ origin - Returns the origin of the
wasm_trap_tif any. - wasm_
trap_ same - Returns
trueif the given references are pointing to the samewasm_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_tand stores the result inout. - wasm_
val_ ⚠delete - Deletes the
wasm_val_t. - wasm_
val_ vec_ copy - Copies the
wasm_val_vec_tinsrc. - wasm_
val_ vec_ delete - Frees memory associated to the
wasm_val_vec_t. - wasm_
val_ ⚠vec_ new - Creates an new
wasm_val_vec_twith the givensizeandptrdata. - wasm_
val_ vec_ new_ empty - Creates an empty
wasm_val_vec_t - wasm_
val_ vec_ new_ uninitialized - Creates an uninitialized
wasm_val_vec_twith the givensize. - wasm_
valtype_ copy - Creates a new
wasm_valtype_twhich matches the provided one. - wasm_
valtype_ delete - Deletes the
wasm_valtype_t. - wasm_
valtype_ kind - Returns the
wasm_valkind_tof thewasm_valtype_t. - wasm_
valtype_ new - Creates a new owned
wasm_valtype_tfrom thewasm_valkind_t. - wasm_
valtype_ vec_ copy - Copies the
wasm_valtype_vec_tinsrc. - wasm_
valtype_ vec_ delete - Frees memory associated to the
wasm_valtype_vec_t. - wasm_
valtype_ ⚠vec_ new - Creates an new
wasm_valtype_vec_twith the givensizeandptrdata. - wasm_
valtype_ vec_ new_ empty - Creates an empty
wasm_valtype_vec_t - wasm_
valtype_ vec_ new_ uninitialized - Creates an uninitialized
wasm_valtype_vec_twith the givensize. - 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-operationsproposal. - wasmi_
config_ wasm_ extended_ const_ set - Enables or disables support for the Wasm
extended-constproposal. - wasmi_
config_ wasm_ multi_ value_ set - Enables or disables support for the Wasm
multi-valueproposal. - wasmi_
config_ wasm_ mutable_ globals_ set - Enables or disables support for the Wasm
mutable-globalproposal. - wasmi_
config_ wasm_ reference_ types_ set - Enables or disables support for the Wasm
reference-typesproposal. - wasmi_
config_ wasm_ saturating_ float_ to_ int_ set - Enables or disables support for the Wasm
nontrapping-float-to-int-conversionsproposal. - wasmi_
config_ wasm_ sign_ extension_ set - Enables or disables support for the Wasm
sign-extension-opsproposal. - wasmi_
config_ wasm_ tail_ call_ set - Enables or disables support for the Wasm
tail-callproposal. - 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_twith 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 givenengine. - wasmi_
trap_ ⚠new - Creates a new
wasm_trap_tfrom the givenmessageandlenpair.
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.