Expand description
Types and traits for interfacing between the host and the wasm runtime.
Re-exports§
pub use sp_wasm_interface_common as common;
pub use wasmtime;
pub use anyhow;
Modules§
Macros§
Structs§
- Caller
- A structure representing the caller’s context when creating a function
via
Func::wrap
. - Extended
Host Functions - A wrapper which merges two sets of host functions, and allows the second set to override the host functions from the first set.
- Function
Context Token - Host
State - The state required to construct a HostContext context. The context only lasts for one host call, whereas the state is maintained for the duration of a Wasm runtime call, which may make many different host calls that must share state.
- Memory
Wrapper - Wrapper around [
Memory
] that implementssp_allocator::Memory
. - Pointer
- Type to represent a pointer in wasm at the host.
- Signature
- The Signature of a function
- Store
Data
Enums§
- Return
Value - Typed value that can be returned from a function.
- Value
- Values supported by Substrate on the boundary between host/Wasm.
- Value
Type - Value types supported by Substrate on the boundary between host/Wasm.
Traits§
- Function
- Something that provides a function implementation on the host for a wasm function.
- Function
Context - Context used by
Function
to interact with the allocator and the memory of the wasm instance. - Host
Function Registry - A trait used to statically register host callbacks with the WASM executor, so that they call be called from within the runtime with minimal overhead.
- Host
Functions - Something that provides implementations for host functions.
- Into
Value - Something that can be converted into a wasm compatible
Value
. - Maybe
RefUnwind Safe - A trait that requires
RefUnwindSafe
whenfeature = std
. - Pointer
Type - Something that can be wrapped in a wasm
Pointer
. - TryFrom
Value - Something that can may be created from a wasm
Value
. - WasmTy
- A trait for types directly usable at the WASM FFI boundary without any conversion at all.
Functions§
Type Aliases§
- Host
Pointer - Host pointer: suit both for 32-bit and 64-bit archs.
- Memory
Id - Sandbox memory identifier.
- Result
- Result type used by traits in this crate.
- Word
Size - The word size used in wasm. Normally known as
usize
in Rust.