Crate wasmer_types

source Β·
Expand description

This are the common types and utility tools for using WebAssembly in a Rust environment.

This crate provides common structures such as Type or Value, type indexes and native function wrappers with Func.

Re-exports§

Modules§

  • The entity module, with common helpers for Rust structures
  • The WebAssembly possible errors
  • features πŸ”’
  • indexes πŸ”’
    Helper functions and structures for the translation.
  • initializers πŸ”’
  • The lib module defines a std module that is identical whether the core or the std feature is enabled.
  • libcalls πŸ”’
  • memory πŸ”’
  • module πŸ”’
    Data structure for representing WebAssembly modules in a wasmer::Module.
  • module_hash πŸ”’
  • native πŸ”’
  • serialize πŸ”’
  • stack πŸ”’
    Types for the stack tracing / frames.
  • store_id πŸ”’
  • table πŸ”’
  • Target configuration
  • trapcode πŸ”’
    Trap codes describing the reason for a trap.
  • types πŸ”’
  • units πŸ”’
  • utils πŸ”’
  • value πŸ”’
  • vmoffsets πŸ”’
    Offsets and sizes of various structs in wasmer-vm’s vmcontext module.

Macros§

  • Macro which provides the common implementation of a 32-bit entity reference.

Structs§

  • Units of WebAssembly memory in terms of 8-bit bytes.
  • Index type of a custom section inside a WebAssembly module.
  • Index type of a passive data segment inside the WebAssembly module.
  • A data initializer for linear memory.
  • A memory index and offset within that memory where a data initialization should be performed.
  • Index type of a passive element segment inside the WebAssembly module.
  • A descriptor for an exported WebAssembly value.
  • This iterator allows us to iterate over the exports and offer nice API ergonomics over it.
  • Controls which experimental features will be enabled. Features usually have a corresponding WebAssembly proposal.
  • Description of a frame in a backtrace.
  • Index type of a function (imported or local) inside the WebAssembly module.
  • The signature of a function that is either implemented in a Wasm module or exposed to Wasm by the host.
  • Index type of a global variable (imported or local) inside the WebAssembly module.
  • WebAssembly global.
  • Hash key of an import
  • A descriptor for an imported value into a wasm module.
  • This iterator allows us to iterate over the imports and offer nice API ergonomics over it.
  • Index type of a function defined locally inside the WebAssembly module.
  • Index type of a global defined locally inside the WebAssembly module.
  • Index type of a memory defined locally inside the WebAssembly module.
  • Index type of a table defined locally inside the WebAssembly module.
  • Index type of a tag defined locally inside the WebAssembly module.
  • Marker trait for 32-bit memories.
  • Marker trait for 64-bit memories.
  • Index type of a linear memory (imported or local) inside the WebAssembly module.
  • A descriptor for a WebAssembly memory type.
  • Metadata header which holds an ABI version and the length of the remaining metadata.
  • A translated WebAssembly module, excluding the function bodies and memory initializers.
  • As DataInitializer but owning the data rather than holding a reference to it
  • The only error that can happen when converting Bytes to Pages
  • Units of WebAssembly pages (as specified to be 65,536 bytes).
  • Index type of a signature (imported or local) inside the WebAssembly module.
  • A source location.
  • Unique ID to identify a context.
  • Index type of a table (imported or local) inside the WebAssembly module.
  • A WebAssembly table initializer.
  • A descriptor for a table in a WebAssembly module.
  • WebAssembly event.
  • Index type of an event inside the WebAssembly module.
  • The signature of a tag that is either implemented in a Wasm module or exposed to Wasm by the host.
  • Target specific type for shared signature index.
  • Information about trap.
  • The WebAssembly V128 type
  • An index type for builtin functions.
  • This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.

Enums§

  • An entity to export.
  • A list of all possible types which can be externally referenced from a WebAssembly module.
  • Globals are initialized via the const operators or by referring to another import.
  • Hashing algorithm to be used for the module info
  • An entity to import.
  • The name of a runtime library routine.
  • Implementation styles for WebAssembly linear memory.
  • The hash of a WebAssembly module.
  • Indicator of whether a global is mutable or not
  • After the stack is unwound via asyncify what should the call loop do next
  • Implementation styles for WebAssembly tables.
  • The kind of a [Tag].
  • A trap code describing the reason for a trap.
  • A list of all possible value types in WebAssembly.

Constants§

  • Version number of this crate.
  • The number of pages we can have before we run out of byte index space.
  • The minimum number of pages allowed.
  • WebAssembly page sizes are fixed to be 64KiB. Note: large page support may be added in an opt-in manner in the future.

Traits§

  • Any struct that acts like a DataInitializer.
  • Any struct that acts like a DataInitializerLocation.
  • Trait for the Memory32 and Memory64 marker types.
  • NativeWasmType represents a Wasm type that has a direct representation on the host (hence the β€œnative” term).
  • Trait for a Value type. A Value type is a type that is always valid and may be safely copied.

Functions§

  • Check if the provided bytes are wasm-like

Type Aliases§

  • Addend to add to the symbol value.
  • Offset in bytes from the beginning of the function.

Unions§

  • Raw representation of a WebAssembly value.