Crate wasm

Source

Modules§

addrs
Type definitions for addr types
config
const_interpreter_loop
core 🔒
error
execution 🔒
function_ref
interop
This module provides types, traits and impls to convert between Rust types and the Wasm Value type. Internally this module is not used, except for the top-level entry points for invocation.
registry
resumable
rw_spinlock
Naive implementation of spin based locking mechanisms
store
validation 🔒
value
value_stack

Macros§

unreachable_validated

Structs§

GlobalType
HaltExecutionError
A marker error for host functions to return, in case they want execution to be halted.
Limits
RuntimeInstance
Store
The store represents all global state that can be manipulated by WebAssembly programs. It consists of the runtime representation of all instances of functions, tables, memories, and globals, element segments, and data segments that have been allocated during the life time of the abstract machine. https://webassembly.github.io/spec/core/exec/runtime.html#store
ValidationInfo
Information collected from validating a module. This can be used to create a crate::RuntimeInstance.

Enums§

Error
An opt-in error type useful for merging all error types of this crate into a single type.
ExportDesc
ExternVal
https://webassembly.github.io/spec/core/exec/runtime.html#external-values
NumType
https://webassembly.github.io/spec/core/binary/types.html#number-types
RefType
https://webassembly.github.io/spec/core/binary/types.html#reference-types
RuntimeError
TrapError
ValType
https://webassembly.github.io/spec/core/binary/types.html#reference-types TODO flatten NumType and RefType enums, as they are not used individually and wasmparser also does it.
ValidationError
Value
A value at runtime. This is essentially a duplicate of ValType just with additional values.

Constants§

DEFAULT_MODULE
The default module name if a RuntimeInstance was created using RuntimeInstance::new.

Traits§

ExternFilterable
common convention functions defined for lists of ExternVals, ExternTypes, Exports https://webassembly.github.io/spec/core/exec/runtime.html#conventions https://webassembly.github.io/spec/core/syntax/types.html#id3 https://webassembly.github.io/spec/core/syntax/modules.html?highlight=convention#id1

Functions§

host_function_wrapper
Helper function to quickly construct host functions without worrying about wasm to Rust type conversion. For reading/writing user data into the current configuration, simply move user_data into the passed closure.
validate

Type Aliases§

Result
A definition for a Result using the optional Error type.