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§

  • Types for compilation.
  • The entity module, with common helpers for Rust structures
  • The WebAssembly possible errors
  • The lib module defines a std module that is identical whether the core or the std feature is enabled.

Macros§

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

Structs§

Enums§

  • The “architecture” field, which in some cases also specifies a specific subarchitecture.
  • The “binary format” field, which is usually omitted, and the binary format is implied by the other fields.
  • The calling convention, which specifies things like which registers are used for passing arguments, which registers are callee-saved, and so on.
  • The target memory endianness.
  • The “environment” field, which specifies an ABI environment on top of the operating system. In many configurations, this field is omitted, and the environment is implied by the operating system.
  • 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
  • The “operating system” field, which sometimes implies an environment, and sometimes isn’t an actual operating system.
  • The width of a pointer (in the default address space).
  • Implementation styles for WebAssembly tables.
  • A trap code describing the reason for a trap.
  • A list of all possible value types in WebAssembly.
  • The “vendor” field, which in practice is little more than an arbitrary modifier.

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.