Expand description
Support for compiling with Cranelift.
This crate provides an implementation of the wasmtime_environ::Compiler
and wasmtime_environ::CompilerBuilder
traits.
Modules§
Structs§
- Compiled
Function - Compiled function: machine code body, jump table offsets, and unwind information.
- Compiled
Function Metadata - The metadata for the compiled function.
- Function
Address Map - Metadata to translate from binary offsets back to the original location found in the wasm input.
- Module
Text Builder - A helper structure used to assemble the final text section of an executable, plus unwinding information and other related details.
- Relocation
- A record of a relocation to perform.
Constants§
- NS_
PULLEY_ HOSTCALL - Namespace used to when a call from Pulley to the host is being made. This is
used with a
colocated: false
name to trigger codegen for a special opcode for pulley-to-host communication. The index of the functions used in this namespace correspond to the function signature offor_each_host_signature!
in the pulley_interpreter crate. - NS_
WASMTIME_ BUILTIN - Namespace for builtin function trampolines. The index is the index of the
builtin that’s being referenced. These trampolines invoke the real host
function through an indirect function call loaded by the
VMContext
. - NS_
WASM_ FUNC - Namespace corresponding to wasm functions, the index is the index of the defined function that’s being referenced.
- TRAP_
ALLOCATION_ TOO_ LARGE - TRAP_
ALWAYS - TRAP_
ARRAY_ OUT_ OF_ BOUNDS - TRAP_
BAD_ SIGNATURE - TRAP_
CANNOT_ ENTER - TRAP_
CAST_ FAILURE - TRAP_
HEAP_ MISALIGNED - TRAP_
INDIRECT_ CALL_ TO_ NULL - TRAP_
NULL_ REFERENCE - TRAP_
TABLE_ OUT_ OF_ BOUNDS - TRAP_
UNREACHABLE
Functions§
- builder
- clif_
flags_ to_ wasmtime - Converts cranelift_codegen settings to the wasmtime_environ equivalent.
- mach_
trap_ to_ trap - Converts machine traps to trap information.