Crate wasmer_types[][src]

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.

Modules

entity

The entity module, with common helpers for Rust structures

Structs

Atomically

Atomically.

Bytes

Units of WebAssembly memory in terms of 8-bit bytes.

CustomSectionIndex

Index type of a custom section inside a WebAssembly module.

DataIndex

Index type of a passive data segment inside the WebAssembly module.

DataInitializer

A data initializer for linear memory.

DataInitializerLocation

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

ElemIndex

Index type of a passive element segment inside the WebAssembly module.

ExportType

A descriptor for an exported WebAssembly value.

Features

Controls which experimental features will be enabled. Features usually have a corresponding WebAssembly proposal.

FunctionIndex

Index type of a function (imported or local) inside the WebAssembly module.

FunctionType

The signature of a function that is either implemented in a Wasm module or exposed to Wasm by the host.

GlobalIndex

Index type of a global variable (imported or local) inside the WebAssembly module.

GlobalType

WebAssembly global.

HostRef

Represents a piece of data located in the host environment.

ImportType

A descriptor for an imported value into a wasm module.

LocalFunctionIndex

Index type of a function defined locally inside the WebAssembly module.

LocalGlobalIndex

Index type of a global defined locally inside the WebAssembly module.

LocalMemoryIndex

Index type of a memory defined locally inside the WebAssembly module.

LocalTableIndex

Index type of a table defined locally inside the WebAssembly module.

MemoryIndex

Index type of a linear memory (imported or local) inside the WebAssembly module.

MemoryType

A descriptor for a WebAssembly memory type.

MemoryView

A view into a memory.

OwnedDataInitializer

As DataInitializer but owning the data rather than holding a reference to it

PageCountOutOfRange

The only error that can happen when converting Bytes to Pages

Pages

Units of WebAssembly pages (as specified to be 65,536 bytes).

SignatureIndex

Index type of a signature (imported or local) inside the WebAssembly module.

TableIndex

Index type of a table (imported or local) inside the WebAssembly module.

TableInitializer

A WebAssembly table initializer.

TableType

A descriptor for a table in a WebAssembly module.

V128

The WebAssembly V128 type

Enums

ExportIndex

An entity to export.

ExternRef

Represents an opaque reference to any data within WebAssembly.

ExternType

A list of all possible types which can be externally referenced from a WebAssembly module.

GlobalInit

Globals are initialized via the const operators or by referring to another import.

ImportIndex

An entity to import.

Mutability

Indicator of whether a global is mutable or not

Type

A list of all possible value types in WebAssembly.

Value

Possible runtime values that a WebAssembly module can either consume or produce.

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_MIN_PAGES

The minimum number of pages allowed.

WASM_PAGE_SIZE

WebAssembly page sizes are fixed to be 64KiB. Note: large page support may be added in an opt-in manner in the future.

Traits

HostInfo
NativeWasmType

NativeWasmType represents a Wasm type that has a direct representation on the host (hence the “native” term).

ValueType

Trait for a Value type. A Value type is a type that is always valid and may be safely copied.