Crate wasmtime_environ

source ·
Expand description

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§

Modules§

  • The Rust Core Library
  • Utilities for working with object files that operate as Wasmtime’s serialization and intermediate format for compiled modules.
  • Compact representation of Option<T> for types with a reserved value.
  • A simple event-driven library for parsing WebAssembly binary files (or streams).

Macros§

  • Macro which provides the common implementation of a 32-bit entity reference.
  • Helper macro to iterate over all builtin functions and their signatures.
  • Return an Err(WasmError::Unsupported(msg)) where msg the string built by calling format! on the arguments to this macro.

Structs§

  • Builder for the address map section of a wasmtime compilation image.
  • A slice mapping K -> V allocating dense entity references.
  • An index type for builtin functions.
  • Index type of a passive data segment inside the WebAssembly module.
  • Index type of a defined function inside the WebAssembly module.
  • Index type of a defined global inside the WebAssembly module.
  • Index type of a defined memory inside the WebAssembly module.
  • Index type of a defined table inside the WebAssembly module.
  • Index type of a passive element segment inside the WebAssembly module.
  • A small list of entity references allocated from a pool.
  • A set of K for densely indexed entity references.
  • A position within an original source file,
  • Index type of a function (imported or defined) inside the WebAssembly module.
  • Index into the funcref table within a VMContext for a function.
  • Contains function data: byte code and its offset in the module.
  • Description of where a function is located in the text section of a compiled image.
  • Type information about functions in a wasm module.
  • A WebAssembly global.
  • Index type of a global variable (imported or defined) inside the WebAssembly module.
  • Type representing the size of a pointer for the current compilation host
  • Single source location to generated address mapping.
  • Iterate over all keys in order.
  • Iterate over all keys in order.
  • Iterate over all keys in order.
  • A memory pool for storing lists of T.
  • WebAssembly linear memory.
  • Index type of a linear memory (imported or defined) inside the WebAssembly module.
  • A WebAssembly linear memory initializer.
  • A WebAssembly linear memory description along with our chosen style for implementing it.
  • A translated WebAssembly module, excluding the function bodies and memory initializers.
  • Object containing the standalone environment information.
  • 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.
  • All types used in a core wasm module.
  • A builder for ModuleTypes.
  • Index type of a defined memory inside the WebAssembly module.
  • A primary mapping K -> V allocating dense entity references.
  • Small data structure to help extend the lifetime of a slice to a higher scope.
  • A mapping K -> V for densely indexed entity references.
  • Description of compiler settings returned by CompilerBuilder::settings.
  • Index type of a signature (imported or defined) inside the WebAssembly module.
  • A sparse mapping of entity references.
  • A map for determining where live GC references live in a stack frame.
  • The offset within a function of a GC safepoint, and its associated stack map.
  • Similar to the above MemoryInitializer but only used when memory initializers are statically known to be valid.
  • Index into the global list of modules found within an entire component.
  • WebAssembly table.
  • Index type of a table (imported or defined) inside the WebAssembly module.
  • Table initialization data for all tables in the module.
  • A WebAssembly table description along with our chosen style for implementing it.
  • A WebAssembly table initializer segment.
  • WebAssembly event.
  • Index type of an event inside the WebAssembly module.
  • A helper structure to build the custom-encoded section of a wasmtime compilation image which encodes trap information.
  • Information about trap.
  • Tunable parameters for WebAssembly compilation.
  • Index type of a type inside the WebAssembly module.
  • This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.
  • Used to construct a VMOffsets
  • WebAssembly function type – equivalent of wasmparser’s FuncType.
  • Information about a function, such as trap information, address map, and stack maps.
  • WebAssembly reference type – equivalent of wasmparser’s RefType

Enums§

Constants§

Traits§

  • Implementation of an incremental compilation’s key/value cache store.
  • An implementation of a compiler which can compile WebAssembly functions to machine code and perform other miscellaneous tasks needed by the JIT runtime.
  • Abstract trait representing the ability to create a Compiler below.
  • A type wrapping a small integer index should implement EntityRef so it can be used as the key of an SecondaryMap or SparseMap.
  • Trait used for the ptr representation of the field of VMOffsets
  • Trait for extracting keys from values stored in a SparseMap.
  • Helpers used to convert a wasmparser type to a type in this crate.
  • Helper trait used to add unsigned() methods to primitive signed integer types.

Functions§

  • Iterate over the address map contained in the given address map section.
  • Lookup an offset within an encoded address map section, returning the original FilePos that corresponds to the offset, if found.
  • Decodes the provided trap information section and attempts to find the trap code corresponding to the offset specified.

Type Aliases§

  • A sparse set of entity references.
  • A convenient alias for a Result that uses WasmError as the error type.