Skip to main content

Crate spacewasm

Crate spacewasm 

Source

Re-exports§

pub use util::*;
pub use error::*;
pub use module::*;

Modules§

error
module
util

Macros§

global_allocator
vec

Structs§

Chunk
CodeBuilder
Low-level builder for paged IR code.
Compiler
CompilerOptions
ConstantCompiler
Engine
The Wasm engine holds the state of the interpreter and the WebAssembly store
Expr
Func
FuncType
GlobalType
GlobalValueError
GlobalVariable
The decoded representation of a global variable
HostFunction
HostGlobal
HostModule
HostModuleRef
HostName
A bounded, inline, owned host name (module / function / global / symbol).
HostNameError
Error returned when a host name exceeds [HOST_NAME_CAP] bytes or is not valid UTF-8.
HostRef
A general purpose reference to a symbol in a host module
HostSymbol
HostValList
An owned, bounded list of ValType describing a host function’s parameters or results. Parsed from a signature string of the characters i (i32), I (i64), f (f32), d (f64).
HostValListError
Error returned when a host value signature contains an invalid character or exceeds HOST_SIGNATURE_CAP entries.
HostValListIter
Interpreter
JumpOffset
A relative offset to jump to from the current program counter
JumpTarget
A 32-bit address into the paged IR code.
LabelTarget
A 32-bit value encoding a label’s arity, jump address, and stack truncation information [arity:2][depth:8][offset:22]
Limit
LocalVariable
MemArg
MemType
Memory
MemoryStatistics
ModuleRef
An index offset from the current module. Module imports can only refer to modules loaded before it. References store a relative offset from the ‘current’ module. 0 indicates the current module.
Name
A pointer and length into a UTF-8 string on the original Wasm
RawValue
A compile-time/configured value
Reader
A struct for managing and reading Wasm bytecode Its purpose is to abstract parsing basic Wasm values from the bytecode and managing the chunks from a stream as they are read.
ResultType
Stack
Store
Holds ownership of all the loaded modules. As new modules are loaded, imports/exports are referenced through the store.
TableType
TextBuilder
High-level builder for compiled IR that handles control flow and instruction encoding.
TextPage
A page of compiled IR code containing 256 16-bit words (512 bytes).
WasmRef
A reference to a Wasm symbol in the store

Enums§

BlockKind
ConstantExprError
ElemType
HostFunctionBreak
Import
InterpreterBreak
InterpreterResult
InvokeError
LabelArity
MemPageSize
MemoryError
Ref
A reference to a symbol in the Wasm store relative to an implicit ‘self’ module
StartInvocation
TrapReason
ValType
Value types classify the individual values that WebAssembly code can compute with and the values that a variable accepts. https://www.w3.org/TR/wasm-core-1/#syntax-valtype
Value
A runtime type-tracked value

Constants§

HOST_FUNCTION_NAME_CAP
HOST_GLOBAL_NAME_CAP
HOST_MODULE_NAME_CAP
HOST_SIGNATURE_CAP
Maximum number of values in a host function parameter / result signature.

Traits§

BaseVisitor
An abstraction over Wasm IR and internal IR. This trait can be used to index, compile and execute either form of IR with the same common implementation. The decoding and traversal code will call into this visitor and is IR specific. This trait is purely for operating on decoded WebAssembly instructions.
GlobalValue
InterpreterRunner
This is a meta-trait that provides an auto implementation of run() for all IrVisitors of a certain shape.
IrVisitor
An abstraction over IR Bytecode. Used to implement the interpreter.
WasmMemoryAllocator
An allocator for allocating Wasm pages
WasmStream
WasmVisitor
An abstraction over Wasm Bytecode. Used to implement validation and compilation of Wasm bytecode.

Type Aliases§

HostFunctionFn
HostFunctionResult