Expand description
Runtime library support for Wasmtime.
Modules§
- libcalls
- Runtime library calls.
Structs§
- Export
Function - A function export value.
- Export
Global - A global export value.
- Export
Memory - A memory export value.
- Export
Table - A table export value.
- GdbJit
Image Registration - Registeration for JIT image
- Imports
- Resolved import pointers.
- Instance
Handle - A handle holding an
Instance
of a WebAssembly module. - Link
Error - An link error while instantiating a module.
- Mmap
- A simple struct consisting of a page-aligned pointer to page-aligned and initially-zeroed memory and a length.
- Signature
Registry - WebAssembly requires that the caller and callee signatures in an indirect call must match. To implement this efficiently, keep a registry of all signatures, shared by all instances, so that call sites can just do an index comparison.
- Table
- A table instance.
- VMCaller
Checked Anyfunc - The VM caller-checked “anyfunc” record, for caller-side signature checking. It consists of the actual function pointer and a signature id to be checked by the caller.
- VMContext
- The VM “context”, which is pointed to by the
vmctx
arg in Cranelift. This has information about globals, memories, tables, and other runtime state associated with the current instance. - VMFunction
Body - A placeholder byte-sized type which is just used to provide some amount of type safety when dealing with pointers to JIT-compiled function bodies. Note that it’s deliberately not Copy, as we shouldn’t be carelessly copying function body bytes around.
- VMFunction
Import - An imported function.
- VMGlobal
Definition - The storage for a WebAssembly global defined within the instance.
- VMGlobal
Import - The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance.
- VMInterrupts
- Structure used to control interrupting wasm code, currently with only one atomic flag internally used.
- VMInvoke
Argument - The storage for a WebAssembly invocation argument
- VMMemory
Definition - The fields compiled code needs to access to utilize a WebAssembly linear memory defined within the instance, namely the start address and the size in bytes.
- VMMemory
Import - The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance.
- VMShared
Signature Index - An index into the shared signature registry, usable for checking signatures at indirect calls.
- VMTable
Definition - The fields compiled code needs to access to utilize a WebAssembly table defined within the instance.
- VMTable
Import - The fields compiled code needs to access to utilize a WebAssembly table imported from another instance.
Enums§
- Export
- The value of an export passed from one instance to another.
- Instantiation
Error - An error while instantiating a module.
- Trap
- Stores trace message with backtrace.
Constants§
- VERSION
- Version number of this crate.
Traits§
- Runtime
Linear Memory - A linear memory
- Runtime
Memory Creator - A memory allocator
Functions§
- catch_
traps ⚠ - Catches any wasm traps that happen within the execution of
closure
, returning them as aResult
. - init_
traps - This function performs the low-overhead signal handler initialization that we want to do eagerly to ensure a more-deterministic global process state.
- raise_
lib_ ⚠trap - Raises a trap from inside library code immediately.
- raise_
user_ ⚠trap - Raises a user-defined trap immediately.
- resume_
panic ⚠ - Carries a Rust panic across wasm code and resumes the panic on the other side.
Type Aliases§
- Signal
Handler - Function which may handle custom signals while processing traps.
- VMTrampoline