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 aStoreis used to implement thewasm.hAPI (and not thewasmtime.hAPI!)
- *mut wasm_ref_tis a reference type (- externrefor- funcref), as seen by the C API. Because we do not have a uniform representation for- funcrefs and- externrefs, a- *mut wasm_ref_tis morally a- Option<Box<Either<ExternRef, Func>>>.
- Representation of aStoreforwasmtime.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 thewasm_config_t.
- Deletes thewasm_engine_t.
- Creates a newwasm_exporttype_twhich matches the provided one.
- Deletes thewasm_exporttype_t.
- Returns thewasm_extern_tas mutable reference.
- Returns thewasm_extern_tas immutable reference.
- Creates a newwasm_extern_twhich matches the provided one.
- Deletes thewasm_extern_t.
- Returns the host information of thewasm_extern_t.
- Returnstrueif the given references are pointing to the samewasm_extern_t.
- Sets the host information of thewasm_extern_t.
- Sets the host information finalizer of thewasm_extern_t.
- Creates a newwasm_externtype_twhich matches the provided one.
- Deletes thewasm_externtype_t.
- Returns thewasm_foreign_tas mutable reference.
- Returns thewasm_foreign_tas immutable reference.
- Creates a newwasm_foreign_twhich matches the provided one.
- Deletes thewasm_foreign_t.
- Returns the host information of thewasm_foreign_t.
- Returnstrueif the given references are pointing to the samewasm_foreign_t.
- Sets the host information of thewasm_foreign_t.
- Sets the host information finalizer of thewasm_foreign_t.
- Deletes thewasm_frame_t.
- Returns thewasm_func_tas mutable reference.
- Returns thewasm_func_tas immutable reference.
- Creates a newwasm_func_twhich matches the provided one.
- Deletes thewasm_func_t.
- Returns the host information of thewasm_func_t.
- Returnstrueif the given references are pointing to the samewasm_func_t.
- Sets the host information of thewasm_func_t.
- Sets the host information finalizer of thewasm_func_t.
- Creates a newwasm_functype_twhich matches the provided one.
- Deletes thewasm_functype_t.
- Returns thewasm_global_tas mutable reference.
- Returns thewasm_global_tas immutable reference.
- Creates a newwasm_global_twhich matches the provided one.
- Deletes thewasm_global_t.
- Returns the host information of thewasm_global_t.
- Returnstrueif the given references are pointing to the samewasm_global_t.
- Sets the host information of thewasm_global_t.
- Sets the host information finalizer of thewasm_global_t.
- Creates a newwasm_globaltype_twhich matches the provided one.
- Deletes thewasm_globaltype_t.
- Creates a newwasm_importtype_twhich matches the provided one.
- Deletes thewasm_importtype_t.
- Returns thewasm_instance_tas mutable reference.
- Returns thewasm_instance_tas immutable reference.
- Creates a newwasm_instance_twhich matches the provided one.
- Deletes thewasm_instance_t.
- Returns the host information of thewasm_instance_t.
- Returnstrueif the given references are pointing to the samewasm_instance_t.
- Sets the host information of thewasm_instance_t.
- Sets the host information finalizer of thewasm_instance_t.
- Returns thewasm_memory_tas mutable reference.
- Returns thewasm_memory_tas immutable reference.
- Creates a newwasm_memory_twhich matches the provided one.
- Deletes thewasm_memory_t.
- Returns the host information of thewasm_memory_t.
- Returnstrueif the given references are pointing to the samewasm_memory_t.
- Sets the host information of thewasm_memory_t.
- Sets the host information finalizer of thewasm_memory_t.
- Creates a newwasm_memorytype_twhich matches the provided one.
- Deletes thewasm_memorytype_t.
- Returns thewasm_module_tas mutable reference.
- Returns thewasm_module_tas immutable reference.
- Creates a newwasm_module_twhich matches the provided one.
- Deletes thewasm_module_t.
- Returns the host information of thewasm_module_t.
- Returnstrueif the given references are pointing to the samewasm_module_t.
- Sets the host information of thewasm_module_t.
- Sets the host information finalizer of thewasm_module_t.
- Deletes thewasm_ref_t.
- Deletes thewasm_shared_module_t.
- Deletes thewasm_store_t.
- Returns thewasm_table_tas mutable reference.
- Returns thewasm_table_tas immutable reference.
- Creates a newwasm_table_twhich matches the provided one.
- Deletes thewasm_table_t.
- Returns the host information of thewasm_table_t.
- Returnstrueif the given references are pointing to the samewasm_table_t.
- Sets the host information of thewasm_table_t.
- Sets the host information finalizer of thewasm_table_t.
- Creates a newwasm_tabletype_twhich matches the provided one.
- Deletes thewasm_tabletype_t.
- Returns thewasm_trap_tas mutable reference.
- Returns thewasm_trap_tas immutable reference.
- Creates a newwasm_trap_twhich matches the provided one.
- Deletes thewasm_trap_t.
- Returns the host information of thewasm_trap_t.
- Returnstrueif the given references are pointing to the samewasm_trap_t.
- Sets the host information of thewasm_trap_t.
- Sets the host information finalizer of thewasm_trap_t.
- Creates a newwasm_valtype_twhich matches the provided one.
- Deletes thewasm_valtype_t.
- Deletes thewasmtime_error_t.
- Deletes thewasmtime_linker_t.
- Deletes thewasmtime_module_t.
- Deletes thewasmtime_store_t.