Crate wasmtime_cranelift

Source
Expand description

Support for compiling with Cranelift.

This crate provides an implementation of the wasmtime_environ::Compiler and wasmtime_environ::CompilerBuilder traits.

Modules§

isa_builder

Structs§

CompiledFunction
Compiled function: machine code body, jump table offsets, and unwind information.
CompiledFunctionMetadata
The metadata for the compiled function.
FunctionAddressMap
Metadata to translate from binary offsets back to the original location found in the wasm input.
ModuleTextBuilder
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 of for_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.