[−][src]Crate wasmer_clif_fork_wasm
Performs translation from a wasm module in binary format to the in-memory form
of Cranelift IR. More particularly, it translates the code of all the functions bodies and
interacts with an environment implementing the
ModuleEnvironment
trait to deal with tables, globals and linear memory.
The crate provides a DummyEnvironment
struct that will allow to translate the code of the
functions but will fail at execution.
The main function of this module is translate_module
.
Structs
DefinedFuncIndex | Index type of a defined function inside the WebAssembly module. |
DefinedGlobalIndex | Index type of a defined global inside the WebAssembly module. |
DefinedMemoryIndex | Index type of a defined memory inside the WebAssembly module. |
DefinedTableIndex | Index type of a defined table inside the WebAssembly module. |
DummyEnvironment | This |
FuncIndex | Index type of a function (imported or defined) inside the WebAssembly module. |
FuncTranslator | WebAssembly to Cranelift IR function translator. |
Global | WebAssembly global. |
GlobalIndex | Index type of a global variable (imported or defined) inside the WebAssembly module. |
Memory | WebAssembly linear memory. |
MemoryIndex | Index type of a linear memory (imported or defined) inside the WebAssembly module. |
SignatureIndex | Index type of a signature (imported or defined) inside the WebAssembly module. |
Table | WebAssembly table. |
TableIndex | Index type of a table (imported or defined) inside the WebAssembly module. |
TranslationState | Contains information passed along during the translation and that records: |
Enums
GlobalInit | Globals are initialized via the four |
GlobalVariable | The value of a WebAssembly global variable. |
ReturnMode | How to return from functions. |
TableElementType | WebAssembly table element. Can be a function or a scalar type. |
WasmError | A WebAssembly translation error. |
Constants
VERSION | Version number of this crate. |
Traits
FuncEnvironment | Environment affecting the translation of a single WebAssembly function. |
ModuleEnvironment | An object satisfying the |
Functions
declare_locals | Declare |
get_vmctx_value_label | Special VMContext value label. It is tracked as 0xffff_fffe label. |
translate_module | Translate a sequence of bytes forming a valid Wasm binary into a list of valid Cranelift IR
|
translate_operator | Translates wasm operators into Cranelift IR instructions. Returns |
Type Definitions
WasmResult | A convenient alias for a |