Docs.rs
  • wasmtime-environ-14.0.1
    • wasmtime-environ 14.0.1
    • Docs.rs crate page
    • Apache-2.0 WITH LLVM-exception
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • alexcrichton
    • sunfishcode
    • github:bytecodealliance:wasmtime-publish
    • Dependencies
      • anyhow ^1.0.22 normal
      • cranelift-entity ^0.101.1 normal
      • gimli ^0.28.0 normal
      • indexmap ^2.0.0 normal
      • log ^0.4.8 normal
      • object ^0.32 normal
      • serde ^1.0.188 normal
      • serde_derive ^1.0.188 normal
      • target-lexicon ^0.12.3 normal
      • thiserror ^1.0.43 normal
      • wasm-encoder ^0.35.0 normal
      • wasmparser ^0.115.0 normal
      • wasmprinter ^0.2.70 normal
      • wasmtime-component-util =14.0.1 normal
      • wasmtime-types ^14.0.1 normal
      • clap ^4.3.12 dev
      • env_logger ^0.10 dev
      • wat ^1.0.77 dev
    • Versions
    • 100% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • Rust
    • About docs.rs
    • Privacy policy
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate wasmtime_environ

wasmtime_environ14.0.1

  • All Items
  • Re-exports
  • Modules
  • Macros
  • Structs
  • Enums
  • Constants
  • Traits
  • Functions
  • Type Aliases

Crates

  • wasmtime_environ
?
Change settings

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

  • pub use object;

Modules

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

Macros

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

Structs

  • AddressMapSection
    Builder for the address map section of a wasmtime compilation image.
  • BoxedSlice
    A slice mapping K -> V allocating dense entity references.
  • BuiltinFunctionIndex
    An index type for builtin functions.
  • DataIndex
    Index type of a passive data segment inside the WebAssembly module.
  • DebugInfoData
  • 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.
  • ElemIndex
    Index type of a passive element segment inside the WebAssembly module.
  • EntityList
    A small list of entity references allocated from a pool.
  • EntitySet
    A set of K for densely indexed entity references.
  • FilePos
    A position within an original source file,
  • FuncIndex
    Index type of a function (imported or defined) inside the WebAssembly module.
  • FuncRefIndex
    Index into the funcref table within a VMContext for a function.
  • FunctionBodyData
    Contains function data: byte code and its offset in the module.
  • FunctionLoc
    Description of where a function is located in the text section of a compiled image.
  • FunctionMetadata
  • FunctionType
    Type information about functions in a wasm module.
  • Global
    A WebAssembly global.
  • GlobalIndex
    Index type of a global variable (imported or defined) inside the WebAssembly module.
  • HostPtr
    Type representing the size of a pointer for the current compilation host
  • InstructionAddressMap
    Single source location to generated address mapping.
  • Iter
    Iterate over all keys in order.
  • IterMut
    Iterate over all keys in order.
  • Keys
    Iterate over all keys in order.
  • ListPool
    A memory pool for storing lists of T.
  • Memory
    WebAssembly linear memory.
  • MemoryIndex
    Index type of a linear memory (imported or defined) inside the WebAssembly module.
  • MemoryInitializer
    A WebAssembly linear memory initializer.
  • 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.
  • 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.
  • ModuleTypes
    All types used in a core wasm module.
  • ModuleTypesBuilder
    A builder for ModuleTypes.
  • NameSection
  • OwnedMemoryIndex
    Index type of a defined memory inside the WebAssembly module.
  • PrimaryMap
    A primary mapping K -> V allocating dense entity references.
  • ScopeVec
    Small data structure to help extend the lifetime of a slice to a higher scope.
  • SecondaryMap
    A mapping K -> V for densely indexed entity references.
  • Setting
    Description of compiler settings returned by CompilerBuilder::settings.
  • SignatureIndex
    Index type of a signature (imported or defined) inside the WebAssembly module.
  • SparseMap
    A sparse mapping of entity references.
  • StackMap
    A map for determining where live GC references live in a stack frame.
  • StackMapInformation
    The offset within a function of a GC safepoint, and its associated stack map.
  • StaticMemoryInitializer
    Similar to the above MemoryInitializer but only used when memory initializers are statically known to be valid.
  • StaticModuleIndex
    Index into the global list of modules found within an entire component.
  • Table
    WebAssembly table.
  • TableIndex
    Index type of a table (imported or defined) inside the WebAssembly module.
  • TableInitialization
    Table initialization data for all tables in the module.
  • TablePlan
    A WebAssembly table description along with our chosen style for implementing it.
  • TableSegment
    A WebAssembly table initializer segment.
  • Tag
    WebAssembly event.
  • TagIndex
    Index type of an event inside the WebAssembly module.
  • TrapEncodingBuilder
    A helper structure to build the custom-encoded section of a wasmtime compilation image which encodes trap information.
  • TrapInformation
    Information about trap.
  • Tunables
    Tunable parameters for WebAssembly compilation.
  • TypeIndex
    Index type of a type inside the WebAssembly module.
  • VMOffsets
    This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.
  • VMOffsetsFields
    Used to construct a VMOffsets
  • WasmFileInfo
  • WasmFuncType
    WebAssembly function type – equivalent of wasmparser’s FuncType.
  • WasmFunctionInfo
    Information about a function, such as trap information, address map, and stack maps.
  • WasmRefType
    WebAssembly reference type – equivalent of wasmparser’s RefType

Enums

  • CompileError
    An error while compiling WebAssembly to machine code.
  • EntityIndex
    An index of an entity.
  • EntityType
    A type of an item in a wasm module where an item is typically something that can be exported.
  • FlagValue
    Value of a configured setting for a Compiler
  • GlobalInit
    Globals are initialized via the const operators or by referring to another import.
  • InitMemory
    Argument to MemoryInitialization::init_memory indicating the current status of the instance.
  • Initializer
    Initialization routines for creating an instance, encompassing imports, modules, instances, aliases, etc.
  • MemoryInitialization
    The type of WebAssembly linear memory initialization to use for a module.
  • MemoryStyle
    Implementation styles for WebAssembly linear memory.
  • ModuleType
    Different types that can appear in a module.
  • ObjectKind
    Types of objects that can be created by Compiler::object
  • SettingKind
    Different kinds of Setting values that can be configured in a CompilerBuilder
  • TableInitialValue
    Initial value for all elements in a table.
  • TableStyle
    Implementation styles for WebAssembly tables.
  • Trap
  • WasmError
    A WebAssembly translation error.
  • WasmHeapType
    WebAssembly heap type – equivalent of wasmparser’s HeapType
  • WasmType
    WebAssembly value type – equivalent of wasmparser’s Type.

Constants

  • FUNCREF_INIT_BIT
    An “initialized bit” in a funcref table.
  • FUNCREF_MASK
    The mask we apply to all refs loaded from funcref tables.
  • VERSION
    Version number of this crate.
  • VMCONTEXT_MAGIC
    Magic value for core Wasm VM contexts.
  • VM_ARRAY_CALL_HOST_FUNC_MAGIC
    Equivalent of VMCONTEXT_MAGIC except for array-call host functions.
  • VM_NATIVE_CALL_HOST_FUNC_MAGIC
    Equivalent of VMCONTEXT_MAGIC except for native-call host functions.
  • WASM32_MAX_PAGES
    The number of pages (for 32-bit modules) we can have before we run out of byte index space.
  • WASM64_MAX_PAGES
    The number of pages (for 64-bit modules) we can have before we run out of byte index space.
  • WASM_PAGE_SIZE
    WebAssembly page sizes are defined to be 64KiB.

Traits

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

Functions

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

Type Aliases

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

Results

trait
wasmtime_environ::CompilerBuilder
Abstract trait representing the ability to create a …
trait method
wasmtime_environ::CompilerBuilder::set
Compiler-specific method to configure various settings in …
trait method
wasmtime_environ::CompilerBuilder::build
Builds a new Compiler object from this configuration.
trait method
wasmtime_environ::CompilerBuilder::enable
Compiler-specific method for configuring settings.
trait method
wasmtime_environ::CompilerBuilder::target
Sets the target of compilation to the target specified.
trait method
wasmtime_environ::CompilerBuilder::triple
Returns the currently configured target triple that …
method
wasmtime_environ::CompilerBuilder::clif_dir
Enables clif output in the directory specified.
trait method
wasmtime_environ::CompilerBuilder::settings
Returns a list of all possible settings that can be …
method
wasmtime_environ::CompilerBuilder::wmemcheck
Enables or disables wmemcheck during runtime according to …
trait method
wasmtime_environ::CompilerBuilder::set_tunables
Set the tunables for this compiler.
trait method
wasmtime_environ::CompilerBuilder::enable_incremental_compilation
Enables Cranelift’s incremental compilation cache, using …
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.