Crate wasmer_compiler_cranelift

Source
Expand description

A WebAssembly Compiler implementation using Cranelift.

Cranelift is a fast IR generator created by Mozilla for usage in Firefox as a next JS compiler generator.

Compared to LLVM, Cranelift is a bit faster and made entirely in Rust.

Modulesยง

address_map ๐Ÿ”’
compiler ๐Ÿ”’
Support for compiling with Cranelift.
config ๐Ÿ”’
debug ๐Ÿ”’
dwarf ๐Ÿ”’
func_environ ๐Ÿ”’
heap ๐Ÿ”’
Heaps to implement WebAssembly linear memories.
table ๐Ÿ”’
trampoline ๐Ÿ”’
translator ๐Ÿ”’
Tools for translating wasm function bytecode to Cranelift IR.

Structsยง

Cranelift
Global configuration options used to create an wasmer_engine::Engine and customize its behavior.
CraneliftCompiler
A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR, optimizing it and then translating to assembly.
ModuleInfoVmctxInfo
ModuleInfo vmctx related info.

Enumsยง

CraneliftOptLevel
Possible optimization levels for the Cranelift codegen backend.
ModuleInfoMemoryOffset
Memory definition offset in the VMContext structure.

Constantsยง

TRAP_BAD_SIGNATURE
Trap reported when an indirect call signature does not match.
TRAP_HEAP_MISALIGNED
Trap reported when a heap access violates alignment guarantees.
TRAP_INDIRECT_CALL_TO_NULL
Trap reported when an indirect call targets a null function reference.
TRAP_INTERRUPT
Trap reported for interrupts (not currently supported).
TRAP_NULL_I31_REF
Trap reported when a null i31 reference is observed.
TRAP_NULL_REFERENCE
Trap reported when a null reference is observed.
TRAP_TABLE_OUT_OF_BOUNDS
Trap reported when a table access goes out of bounds.
TRAP_UNREACHABLE
Trap reported when unreachable code is executed.
TRAP_USER_OFFSET ๐Ÿ”’
Offset applied to user-defined trap codes to avoid colliding with Cranelift-reserved values.
VERSION
Version number of this crate.

Functionsยง

make_trampoline_function_call
Create a trampoline for invoking a WebAssembly function.

Type Aliasesยง

ValueLabelsRanges
Value ranges for functions.