[][src]Crate wasmtime_environ

Standalone environment for WebAssembly using Cranelift. Provides functions to translate get_global, set_global, memory.size, memory.grow, call_indirect that hardcode in the translation the base addresses of regions of memory that will hold the globals, tables and linear memories.

Re-exports

pub use crate::cranelift::Cranelift;

Modules

cranelift

Support for compiling with Cranelift.

entity
ir
isa
settings
wasm

Structs

BuiltinFunctionIndex

An index type for builtin functions.

CacheConfig

Global configuration for how the cache is managed

Compilation

The result of compiling a WebAssembly module's functions.

CompiledFunction

Compiled function: machine code body, jump table offsets, and unwind information.

CompiledFunctionUnwindInfoReloc

Relocation entry for unwind info.

DataInitializer

A data initializer for linear memory.

DataInitializerLocation

A memory index and offset within that memory where a data initialization should is to be performed.

FrameLayout

Frame layout information: call convention and registers save/restore commands.

FunctionAddressMap

Function and its instructions addresses mappings.

FunctionBodyData

Contains function data: byte code and its offset in the module.

InstructionAddressMap

Single source location to generated address mapping.

MemoryPlan

A WebAssembly linear memory description along with our chosen style for implementing it.

Module

A translated WebAssembly module, excluding the function bodies and memory initializers.

ModuleEnvironment

Object containing the standalone environment information.

ModuleLocal

Local information known about a wasm module, the bare minimum necessary to translate function bodies.

ModuleTranslation

The result of translating via ModuleEnvironment. Function bodies are not yet translated, and data initializers have not yet been copied out of the original buffer.

ModuleVmctxInfo

Module vmctx related info.

Relocation

A record of a relocation to perform.

TableElements

A WebAssembly table initializer.

TablePlan

A WebAssembly table description along with our chosen style for implementing it.

TargetSharedSignatureIndex

Target specific type for shared signature index.

TrapInformation

Information about trap.

Tunables

Tunable parameters for WebAssembly compilation.

VMOffsets

This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.

Enums

CompileError

An error while compiling WebAssembly to machine code.

CompiledFunctionUnwindInfo

Compiled function unwind information.

Export

An entity to export.

FrameLayoutChange

Change in the frame layout information.

MemoryStyle

Implemenation styles for WebAssembly linear memory.

ModuleMemoryOffset

Memory definition offset in the VMContext structure.

RelocationTarget

Destination function. Can be either user function or some special one, like memory.grow.

TableStyle

Implemenation styles for WebAssembly tables.

Constants

VERSION

Version number of this crate.

WASM_MAX_PAGES

The number of pages we can have before we run out of byte index space.

WASM_PAGE_SIZE

WebAssembly page sizes are defined to be 64KiB.

Traits

Compiler

An implementation of a compiler from parsed WebAssembly module to native code.

Functions

cache_create_new_config

Creates a new configuration file at specified path, or default path if None is passed. Fails if file already exists.

translate_signature

Add environment-specific function parameters.

Type Definitions

FrameLayouts

Functions frame layouts.

ModuleAddressMap

Module functions addresses mappings.

Relocations

Relocations to apply to function bodies.

Traps

Information about traps associated with the functions where the traps are placed.

ValueLabelsRanges

Value ranges for functions.