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/
Re-exports§
pub use wasmi;
Structs§
- This representation of a
Storeis used to implement thewasm.hAPI (and not thewasmi.hAPI!) - Extensional data stored by
wasmi_store_tto handle foreign data and optional WASI support. - A Wasm compatible vector with element type
u8. - The Wasm configuration.
- The Wasm execution engine.
- A Wasm export type.
- A Wasm compatible vector with element type
Option<Box<wasm_exporttype_t>>. - A Wasm external reference.
- A Wasm compatible vector with element type
Option<Box<wasm_extern_t>>. - A Wasm extern type.
- A Wasm compatible vector with element type
Option<Box<wasm_externtype_t>>. - A foreign defined non-Wasm object.
- A Wasm frame object.
- A Wasm compatible vector with element type [
Option<Box<wasm_frame_t<'a>>>]. - A Wasm function.
- A Wasm function type.
- A Wasm compatible vector with element type
Option<Box<wasm_functype_t>>. - A Wasm global variable.
- A Wasm global variable type.
- A Wasm compatible vector with element type
Option<Box<wasm_globaltype_t>>. - A Wasm import type.
- A Wasm compatible vector with element type
Option<Box<wasm_importtype_t>>. - A Wasm instance.
- Utility type representing minimum and maximum limitations for Wasm types.
- A Wasm linear memory.
- A Wasm linear memory type.
- A Wasm compatible vector with element type
Option<Box<wasm_memorytype_t>>. - A Wasm module.
*mut wasm_ref_tis a reference type (externreforfuncref) for the C API.- A shared Wasm module.
- The Wasm store.
- A Wasm table.
- A Wasm table type.
- A Wasm compatible vector with element type
Option<Box<wasm_tabletype_t>>. - A Wasm trap.
- A Wasm value.
- A Wasm compatible vector with element type
wasm_val_t. - A WebAssembly value type.
- A Wasm compatible vector with element type
Option<Box<wasm_valtype_t>>. - An error that may occur when operating with Wasmi.
- The Wasm store with foreign data and optional WASI support.
Enums§
- The kind of a
wasm_externtype_t. - The mutability of a
wasm_globaltype_t. - The different kinds of
wasm_valtype_t. - Compilation modes supported by the Wasmi execution engine.
Functions§
- Copies the
wasm_byte_vec_tinsrc. - Frees memory associated to the
wasm_byte_vec_t. - Creates an empty
wasm_byte_vec_t - Creates an uninitialized
wasm_byte_vec_twith the givensize. - Deletes the
wasm_config_t. - Creates a new default initialized
wasm_config_t. - Deletes the
wasm_engine_t. - Creates a new default initialized
wasm_engine_t. - Creates a new
wasm_engine_tinitialized with awasm_config_t. - Creates a new
wasm_exporttype_twhich matches the provided one. - Deletes the
wasm_exporttype_t. - Returns a shared reference to the name of the
wasm_exporttype_t. - Returns a shared reference to the extern type of the
wasm_exporttype_t. - Copies the
wasm_exporttype_vec_tinsrc. - Frees memory associated to the
wasm_exporttype_vec_t. - Creates an empty
wasm_exporttype_vec_t - Creates an uninitialized
wasm_exporttype_vec_twith the givensize. - Returns the
wasm_extern_tas reference to mutablewasm_func_tif possible. - Returns the
wasm_extern_tas reference to sharedwasm_func_tif possible. - Returns the
wasm_extern_tas reference to mutablewasm_global_tif possible. - Returns the
wasm_extern_tas reference to sharedwasm_global_tif possible. - Returns the
wasm_extern_tas reference to mutablewasm_memory_tif possible. - Returns the
wasm_extern_tas reference to sharedwasm_memory_tif possible. - Returns the
wasm_extern_tas mutable reference. - Returns the
wasm_extern_tas immutable reference. - Returns the
wasm_extern_tas reference to mutablewasm_table_tif possible. - Returns the
wasm_extern_tas reference to sharedwasm_table_tif possible. - Creates a new
wasm_extern_twhich matches the provided one. - Deletes the
wasm_extern_t. - Returns the host information of the
wasm_extern_t. - Returns the
wasm_extern_kindof thewasm_extern_t. - Returns
trueif the given references are pointing to the samewasm_extern_t. - Sets the host information of the
wasm_extern_t. - Sets the host information finalizer of the
wasm_extern_t. - Returns the
wasm_externtype_tof thewasm_extern_t. - Copies the
wasm_extern_vec_tinsrc. - Frees memory associated to the
wasm_extern_vec_t. - Creates an empty
wasm_extern_vec_t - Creates an uninitialized
wasm_extern_vec_twith the givensize. - Returns a mutable reference to the
wasm_externtype_taswasm_functype_t. - Returns a shared reference to the
wasm_externtype_taswasm_functype_t. - Returns a mutable reference to the
wasm_externtype_taswasm_globaltype_t. - Returns a shared reference to the
wasm_externtype_taswasm_globaltype_t. - Returns a mutable reference to the
wasm_externtype_taswasm_memorytype_t. - Returns a shared reference to the
wasm_externtype_taswasm_memorytype_t. - Returns a mutable reference to the
wasm_externtype_taswasm_tabletype_t. - Returns a shared reference to the
wasm_externtype_taswasm_tabletype_t. - Creates a new
wasm_externtype_twhich matches the provided one. - Deletes the
wasm_externtype_t. - Returns the
wasm_externkind_tof thewasm_externtype_t. - Copies the
wasm_externtype_vec_tinsrc. - Frees memory associated to the
wasm_externtype_vec_t. - Creates an empty
wasm_externtype_vec_t - Creates an uninitialized
wasm_externtype_vec_twith the givensize. - Returns the
wasm_foreign_tas mutable reference. - Returns the
wasm_foreign_tas immutable reference. - Creates a new
wasm_foreign_twhich matches the provided one. - Deletes the
wasm_foreign_t. - Returns the host information of the
wasm_foreign_t. - Creates a new foreign non-Wasm object for the
wasm_store_t. - Returns
trueif the given references are pointing to the samewasm_foreign_t. - Sets the host information of the
wasm_foreign_t. - Sets the host information finalizer of the
wasm_foreign_t. - Returns a copy of the
wasm_frame_t. - Deletes the
wasm_frame_t. - Returns the function index of the
wasm_frame_t. - Returns the function offset of the
wasm_frame_t. - Returns the
wasm_instance_tof thewasm_frame_t. - Returns the module offset of the
wasm_frame_t. - Copies the
wasm_frame_vec_tinsrc. - Frees memory associated to the
wasm_frame_vec_t. - Creates an empty
wasm_frame_vec_t - Creates an uninitialized
wasm_frame_vec_twith the givensize. - Returns the
wasm_func_tas mutable reference towasm_extern_t. - Returns the
wasm_func_tas shared reference towasm_extern_t. - Returns the
wasm_func_tas mutable reference. - Returns the
wasm_func_tas immutable reference. - Creates a new
wasm_func_twhich matches the provided one. - Deletes the
wasm_func_t. - Returns the host information of the
wasm_func_t. - Returns the number of parameter types of the
wasm_func_t. - Returns the number of result types of the
wasm_func_t. - Returns
trueif the given references are pointing to the samewasm_func_t. - Sets the host information of the
wasm_func_t. - Sets the host information finalizer of the
wasm_func_t. - Returns the
wasm_functype_tof thewasm_func_t. - Returns a mutable reference to the element type of
wasm_functype_taswasm_externtype_t. - Returns a shared reference to the element type of
wasm_functype_taswasm_externtype_t. - Creates a new
wasm_functype_twhich matches the provided one. - Deletes the
wasm_functype_t. - Creates a new
wasm_functype_tfrom the given parameter and result types. - Returns a shared reference to the parameter types of the
wasm_functype_t. - Returns a shared reference to the result types of the
wasm_functype_t. - Copies the
wasm_functype_vec_tinsrc. - Frees memory associated to the
wasm_functype_vec_t. - Creates an empty
wasm_functype_vec_t - Creates an uninitialized
wasm_functype_vec_twith the givensize. - Returns the
wasm_global_tas mutable reference towasm_extern_t. - Returns the
wasm_global_tas shared reference towasm_extern_t. - Returns the
wasm_global_tas mutable reference. - Returns the
wasm_global_tas immutable reference. - Creates a new
wasm_global_twhich matches the provided one. - Deletes the
wasm_global_t. - Returns the current value of the
wasm_global_t. - Returns the host information of the
wasm_global_t. - Returns
trueif the given references are pointing to the samewasm_global_t. - Sets the current value of the
wasm_global_t. - Sets the host information of the
wasm_global_t. - Sets the host information finalizer of the
wasm_global_t. - Returns the
wasm_globaltype_tof thewasm_global_t. - Returns a mutable reference to the element type of
wasm_globaltype_taswasm_externtype_t. - Returns a shared reference to the element type of
wasm_globaltype_taswasm_externtype_t. - Returns a shared reference to the content type of the
wasm_globaltype_t. - Creates a new
wasm_globaltype_twhich matches the provided one. - Deletes the
wasm_globaltype_t. - Returns the mutability of the
wasm_globaltype_t. - Creates a new
wasm_globaltype_twith the given content type and mutability. - Copies the
wasm_globaltype_vec_tinsrc. - Frees memory associated to the
wasm_globaltype_vec_t. - Creates an empty
wasm_globaltype_vec_t - Creates an uninitialized
wasm_globaltype_vec_twith the givensize. - Creates a new
wasm_importtype_twhich matches the provided one. - Deletes the
wasm_importtype_t. - Returns a shared reference to the module namespace of the
wasm_importtype_t. - Returns a shared reference to the name namespace of the
wasm_importtype_t. - Returns a shared reference to the extern type of the
wasm_importtype_t. - Copies the
wasm_importtype_vec_tinsrc. - Frees memory associated to the
wasm_importtype_vec_t. - Creates an empty
wasm_importtype_vec_t - Creates an uninitialized
wasm_importtype_vec_twith the givensize. - Returns the
wasm_instance_tas mutable reference. - Returns the
wasm_instance_tas immutable reference. - Creates a new
wasm_instance_twhich matches the provided one. - Deletes the
wasm_instance_t. - Returns the exports of the
wasm_instance_t. - Returns the host information of the
wasm_instance_t. - Instantiates the
wasm_module_twith the given list ofimports. - Returns
trueif the given references are pointing to the samewasm_instance_t. - Sets the host information of the
wasm_instance_t. - Sets the host information finalizer of the
wasm_instance_t. - Returns the
wasm_memory_tas mutable reference towasm_extern_t. - Returns the
wasm_memory_tas shared reference towasm_extern_t. - Returns the
wasm_memory_tas mutable reference. - Returns the
wasm_memory_tas immutable reference. - Creates a new
wasm_memory_twhich matches the provided one. - Returns the underlying data pointer of the
wasm_memory_t. - Returns the data buffer size of the
wasm_memory_t. - Deletes the
wasm_memory_t. - Returns the host information of the
wasm_memory_t. - Grows the
wasm_memory_tbydeltaWasm pages. - Creates a new
wasm_memory_tfrom the givenwasm_memorytype_t. - Returns
trueif the given references are pointing to the samewasm_memory_t. - Sets the host information of the
wasm_memory_t. - Sets the host information finalizer of the
wasm_memory_t. - Returns the current number of Wasm pages of the
wasm_memory_t. - Returns the
wasm_memorytype_tof thewasm_memory_t. - Returns a mutable reference to the element type of
wasm_memorytype_taswasm_externtype_t. - Returns a shared reference to the element type of
wasm_memorytype_taswasm_externtype_t. - Creates a new
wasm_memorytype_twhich matches the provided one. - Deletes the
wasm_memorytype_t. - Returns a shared reference to the table limits of the
wasm_memorytype_t. - Creates a new
wasm_memorytype_twith the givenlimits. - Copies the
wasm_memorytype_vec_tinsrc. - Frees memory associated to the
wasm_memorytype_vec_t. - Creates an empty
wasm_memorytype_vec_t - Creates an uninitialized
wasm_memorytype_vec_twith the givensize. - Returns the
wasm_module_tas mutable reference. - Returns the
wasm_module_tas immutable reference. - Creates a new
wasm_module_twhich matches the provided one. - Deletes the
wasm_module_t. - Deserializes the binary as a
wasm_module_t. - Queries the module exports of the
wasm_module_t. - Returns the host information of the
wasm_module_t. - Queries the module imports of the
wasm_module_t. - Obtains the
wasm_module_tfrom thewasm_shared_module_t. - Returns
trueif the given references are pointing to the samewasm_module_t. - Serializes the
wasm_module_tinto a binary. - Sets the host information of the
wasm_module_t. - Sets the host information finalizer of the
wasm_module_t. - Shares the
moduleand returns a shared image aswasm_shared_module_t. - Returns
trueif the Wasmbinarysuccessfully validates. - Copies the
wasm_ref_tand returns the copied reference. - Deletes the
wasm_ref_t. - Returns the host information of the
wasm_ref_t. - Returns
trueif bothwasm_ref_treferences are referencing the same objects. - Sets the host information of the
wasm_ref_ttoinfo. - Deletes the
wasm_shared_module_t. - Deletes the
wasm_store_t. - Creates a new
Store<()>for the givenengine. - Returns the
wasm_table_tas mutable reference towasm_extern_t. - Returns the
wasm_table_tas shared reference towasm_extern_t. - Returns the
wasm_table_tas mutable reference. - Returns the
wasm_table_tas immutable reference. - Creates a new
wasm_table_twhich matches the provided one. - Deletes the
wasm_table_t. - Returns the host information of the
wasm_table_t. - Grows the number of cells of the
wasm_table_tbydelta. - Creates a new
wasm_table_tfrom the givenwasm_tabletype_t. - Returns
trueif the given references are pointing to the samewasm_table_t. - Sets the host information of the
wasm_table_t. - Sets the host information finalizer of the
wasm_table_t. - Returns the number of cells of the
wasm_table_t. - Returns the
wasm_tabletype_tof thewasm_table_t. - Returns a mutable reference to the element type of
wasm_tabletype_taswasm_externtype_t. - Returns a shared reference to the element type of
wasm_tabletype_taswasm_externtype_t. - Creates a new
wasm_tabletype_twhich matches the provided one. - Deletes the
wasm_tabletype_t. - Returns a shared reference to the element type of the
wasm_tabletype_t. - Returns a shared reference to the table limits of the
wasm_tabletype_t. - Copies the
wasm_tabletype_vec_tinsrc. - Frees memory associated to the
wasm_tabletype_vec_t. - Creates an empty
wasm_tabletype_vec_t - Creates an uninitialized
wasm_tabletype_vec_twith the givensize. - Returns the
wasm_trap_tas mutable reference. - Returns the
wasm_trap_tas immutable reference. - Creates a new
wasm_trap_twhich matches the provided one. - Deletes the
wasm_trap_t. - Returns the host information of the
wasm_trap_t. - Returns the error message of the
wasm_trap_t. - Returns the origin of the
wasm_trap_tif any. - Returns
trueif the given references are pointing to the samewasm_trap_t. - Sets the host information of the
wasm_trap_t. - Sets the host information finalizer of the
wasm_trap_t. - Returns the trace of the
wasm_trap_t. - Copies the
wasm_val_tand stores the result inout. - Deletes the
wasm_val_t. - Copies the
wasm_val_vec_tinsrc. - Frees memory associated to the
wasm_val_vec_t. - Creates an empty
wasm_val_vec_t - Creates an uninitialized
wasm_val_vec_twith the givensize. - Creates a new
wasm_valtype_twhich matches the provided one. - Deletes the
wasm_valtype_t. - Returns the
wasm_valkind_tof thewasm_valtype_t. - Creates a new owned
wasm_valtype_tfrom thewasm_valkind_t. - Copies the
wasm_valtype_vec_tinsrc. - Frees memory associated to the
wasm_valtype_vec_t. - Creates an empty
wasm_valtype_vec_t - Creates an uninitialized
wasm_valtype_vec_twith the givensize. - Enables or disables fuel consumption for the config.
- Enables or disables support for floating point numbers for the config.
- Enables or disables processing of Wasm custom sections.
- Sets the compilation mode for the config.
- Enables or disables support for the Wasm
bulk-memory-operationsproposal. - Enables or disables support for the Wasm
extended-constproposal. - Enables or disables support for the Wasm
multi-valueproposal. - Enables or disables support for the Wasm
mutable-globalproposal. - Enables or disables support for the Wasm
reference-typesproposal. - Enables or disables support for the Wasm
nontrapping-float-to-int-conversionsproposal. - Enables or disables support for the Wasm
sign-extension-opsproposal. - Enables or disables support for the Wasm
tail-callproposal. - Returns a pointer to the foreign data of the Wasmi store context.
- Returns the current fuel of the Wasmi store context in
fuel. - Sets the foreign data of the Wasmi store context.
- Sets the current fuel of the Wasmi store context to
fuel. - Clones a
wasm_engine_t. - Deletes the
wasmi_error_t. - Creates a new
wasmi_error_twith the given error message. - Returns mutable access to the store context of the
wasmi_store_t. - Deletes the
wasmi_store_t. - Creates a new
Store<()>for the givenengine.
Type Aliases§
- A Wasm host function callback.
- A Wasm host function callback with access to environmental data.
- Type specifying the number of pages of a Wasm linear memory.
- A Wasm error message string buffer.
- A Wasm name string buffer.
- Type specifying the number of cells of a Wasm table.
Unions§
- The underlying data of a
wasm_val_t.