Expand description
This crate is the implementation of Wasmtime’s C API.
This crate is normally not intended to be used from Rust itself. For that,
see the wasmtime crate. It is possible to use this crate via Cargo, for
Rust crates that wrap C libraries that use wasmtime. Most often, this crate
is compiled as a cdylib or staticlib, via the wasmtime-c-api crate.
Documentation for this crate largely lives in the header
files of the include directory for this crate.
At a high level this crate implements the wasm.h API with some gymnastics,
but otherwise an accompanying wasmtime.h API is provided which is more
specific to Wasmtime and has fewer gymnastics to implement.
Re-exports§
pub use wasmtime;
Structs§
- Helper for running a C-defined finalizer over some data when the Rust structure is dropped.
- This representation of a
Storeis used to implement thewasm.hAPI (and not thewasmtime.hAPI!) *mut wasm_ref_tis a reference type (externreforfuncref), as seen by the C API. Because we do not have a uniform representation forfuncrefs andexternrefs, a*mut wasm_ref_tis morally aOption<Box<Either<ExternRef, Func>>>.- Representation of a
Storeforwasmtime.hThis notably tries to move more burden of aliasing on the caller rather than internally, allowing for a more raw representation of contexts and such that requires lessunsafein the implementation.
Enums§
Constants§
Functions§
- Deletes the
wasm_config_t. - Deletes the
wasm_engine_t. - Creates a new
wasm_exporttype_twhich matches the provided one. - Deletes the
wasm_exporttype_t. - Returns the
wasm_extern_tas mutable reference. - Returns the
wasm_extern_tas immutable reference. - 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
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. - Creates a new
wasm_externtype_twhich matches the provided one. - Deletes the
wasm_externtype_t. - 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. - 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. - Deletes the
wasm_frame_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
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. - Creates a new
wasm_functype_twhich matches the provided one. - Deletes the
wasm_functype_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 host information of the
wasm_global_t. - Returns
trueif the given references are pointing to the samewasm_global_t. - Sets the host information of the
wasm_global_t. - Sets the host information finalizer of the
wasm_global_t. - Creates a new
wasm_globaltype_twhich matches the provided one. - Deletes the
wasm_globaltype_t. - Creates a new
wasm_importtype_twhich matches the provided one. - Deletes the
wasm_importtype_t. - 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 host information of the
wasm_instance_t. - 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. - Returns the
wasm_memory_tas immutable reference. - Creates a new
wasm_memory_twhich matches the provided one. - Deletes the
wasm_memory_t. - Returns the host information of the
wasm_memory_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. - Creates a new
wasm_memorytype_twhich matches the provided one. - Deletes the
wasm_memorytype_t. - 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. - Returns the host information of the
wasm_module_t. - Returns
trueif the given references are pointing to the samewasm_module_t. - Sets the host information of the
wasm_module_t. - Sets the host information finalizer of the
wasm_module_t. - Deletes the
wasm_ref_t. - Deletes the
wasm_shared_module_t. - Deletes the
wasm_store_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. - 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. - Creates a new
wasm_tabletype_twhich matches the provided one. - Deletes the
wasm_tabletype_t. - 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
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. - Creates a new
wasm_valtype_twhich matches the provided one. - Deletes the
wasm_valtype_t. - Deletes the
wasmtime_error_t. - Deletes the
wasmtime_linker_t. - Deletes the
wasmtime_module_t. - Deletes the
wasmtime_store_t.