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 exectuable, plus unwinding information and other related details.
- Relocation
- A record of a relocation to perform.
Constants§
- ALWAYS_
TRAP_ CODE - A custom code with
TrapCode::Userwhich is used by always-trap shims which indicates that, as expected, the always-trapping function indeed did trap. This effectively provides a better error message as opposed to a bland “unreachable code reached” - CANNOT_
ENTER_ CODE - A custom code with
TrapCode::Usercorresponding to being unable to reenter a component due to its reentrance limitations. This is used in component adapters to provide a more useful error message in such situations. - 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.
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.