Skip to main content

Module runtime

Module runtime 

Source
Expand description

Package Runtime

Handles package instantiation, linking, and execution.

Re-exports§

pub use interceptor::CallInterceptor;

Modules§

interceptor
Call Interceptor

Structs§

AsyncCompiledModule
A compiled WASM module for async execution.
AsyncCtx
Async context for async host functions.
AsyncInstance
An async WASM instance.
AsyncRuntime
An async-enabled package runtime.
BuiltComposition
A built composition ready for execution.
CompiledModule
A compiled WASM module, ready to be instantiated
CompositionBuilder
Builder for creating composed packages with cross-package imports.
Ctx
Context wrapper providing ergonomic access to store data and memory.
DefaultHostProvider
Default host function provider for backward compatibility.
Engine
An Engine which is a global context for compilation and management of wasm modules.
HostFunctionError
Error that occurred during host function execution.
HostImports
Builder for configuring host imports
HostLinkerBuilder
Builder for registering host functions with a Linker.
HostState
State accessible to host functions
Instance
A running WASM instance
InstanceWithHost
Instance with host imports - provides access to host state
InterfaceBuilder
Builder for registering functions within a specific interface/namespace.
Module
A compiled WebAssembly module, ready to be instantiated.
Runtime
The package runtime

Enums§

ExpectedSignature
The expected WASM signature for Graph ABI functions
HostFunctionErrorKind
The specific kind of error that occurred in a host function.
InterfaceError
Errors from interface validation
LinkerError
Errors from linker operations
RuntimeError

Constants§

INPUT_BUFFER_OFFSET
Default input buffer offset (0-16KB)
OUTPUT_BUFFER_CAPACITY
Default output buffer capacity (32KB) - DEPRECATED: guest now allocates
OUTPUT_BUFFER_OFFSET
Default output buffer offset (16KB) - DEPRECATED: use RESULT_PTR_OFFSET
RESULT_LEN_OFFSET
Offset for result length slot (4 bytes at 16KB + 4) Used by new guest-allocates ABI: guest writes output len here
RESULT_PTR_OFFSET
Offset for result pointer slot (4 bytes at 16KB) Used by new guest-allocates ABI: guest writes output ptr here

Traits§

HostFunctionProvider
Trait for types that provide host functions.

Functions§

validate_instance_implements_interface
Validate that a WASM instance implements all functions required by an interface

Type Aliases§

AsyncHostFnResult
Type alias for async host function return type.
ErrorHandler
Handler function for host function errors.
HostFn
A host function that can be wired into compositions.