Expand description
Independently distributable runtime for RillML.
Implementation modules (archive, handler, handler_package, package,
server) are pub(crate) so that downstream code — including the
rill-runtime and rill-pack binaries, integration tests, and external
crates — depends only on the top-level re-exports declared in this file.
This avoids the dual-module-path problem where both
rill_runtime::handler::wasm::WasmInvokeHandler and
rill_runtime::WasmInvokeHandler would otherwise be part of the 1.x
public API surface. Only the re-export path is stable.
Structs§
- Handler
Identity - Identity reported by the runtime in IPC v2 handshake responses.
- Handler
Pack Inspection - Invoke
Error - Typed invoke error.
- Linear
Regression Invoke Handler - Business-neutral linear-regression handler used by the distributed runtime binary.
- Loaded
Handler Pack - Loaded
Model Pack - Model
Pack Inspection - Runtime
Engine - Stateful
Handler Error V2 - Typed handler error with bounded host-only detail.
- Stateful
Handler Metadata V2 - Metadata declared by a Preview ABI v2 handler.
- Stateful
Handler Result V2 - Successful handler result.
next_stateis a proposal; the Runtime still validates it before making it current. - Stateful
Runtime Config V3 - Construction contract for the V3 runtime.
- Stateful
Runtime Engine V3 - Preview Runtime V3 engine for Stateful Handler ABI v2.
- Stateful
State Snapshot V2 - Serializable Runtime-owned state snapshot. Restores verify all fields, state size, JSON validity and checksum before activation.
- Stderr
LogSink - Default
HostLogSinkwriting to stderr viaeprintln!. - Trust
Store - Wasm
Invoke Handler - Sandboxed WASM handler that implements
crate::server::InvokeHandler. - Wasm
Stateful Handler V2 - Sandboxed ABI v2 handler. The linker provides no WASI interfaces, so the guest has no filesystem, network, environment, process, stdio, clock or random imports.
Enums§
- Archive
Error - Engine
Response - Engine-side response produced by
RuntimeEngine. The IPC layer converts this to a v1RuntimeResponseor v2RuntimeResponseV2based on the request’sapi_version. - Handler
Load Error - Errors that arise while loading or preparing a handler for execution.
- Handler
Pack Error - Invoke
Error Kind - Stable categorisation of invoke failures.
- Model
Pack Error - Release
Index Error - Stateful
Handler Error Kind V2 - Stateful handler failure categories. All failures are fail-closed and leave the Runtime-owned state unchanged.
Constants§
- CONFIGURE_
FUEL - Fuel budget for a single
configurecall. - EPOCH_
DEADLINE - Number of epoch ticks before interruption (5 seconds).
- EPOCH_
TICK_ INTERVAL - Epoch tick interval (1 second).
- INVOKE_
FUEL - Fuel budget for a single
invokecall. - LINEAR_
REGRESSION_ CAPABILITY - MAX_
DETAIL_ BYTES - Maximum byte length of the host-only
detailstring. Guests can fully control this payload via the WIThandler-errorvariant, so the host truncates it to bound memory and stderr noise. The limit is enforced on a UTF-8 char boundary so the stored string stays valid. - MAX_
IO_ BYTES - Maximum input/output JSON payload size (1 MiB, matches IPC limit).
- MAX_
MEMORY_ BYTES - Maximum linear memory size per instance (64 MiB).
- MAX_
TABLE_ ELEMENTS - Maximum table entries per instance.
- STATEFUL_
CONFIGURE_ FUEL - STATEFUL_
EPOCH_ DEADLINE - STATEFUL_
EPOCH_ TICK_ INTERVAL - STATEFUL_
HANDLE_ FUEL
Traits§
- Host
LogSink - Minimal host-side log sink for invoke diagnostics.
- Invoke
Handler - Consumers can implement this trait to add business-specific invocation logic.
- Stateful
Handler V2 - Host abstraction implemented by sandboxed ABI v2 handlers and test
doubles. It grants no filesystem, network, process, time or randomness;
deterministic randomness is supplied only through
deterministic_seed.
Functions§
- build_
signed_ handler_ pack - build_
signed_ model_ pack - canonical_
json - effective_
capabilities - Computes the effective capability set: the intersection of model and handler capabilities. Returns an error if the handler does not cover every model capability (first version rejects silent capability loss).
- load_
handler_ pack - load_
model_ pack - sign_
release_ index - sign_
release_ index_ with_ generation - Sign a v3 release index together with a monotonic generation envelope.
- trust_
metadata_ digest - Return the canonical SHA-256 identity a consumer may persist alongside a
metadata generation in
rill_runtime_protocol::TrustVerificationFloorV1. - verify_
release_ index - verify_
release_ index_ with_ trust_ metadata - Verify a signed v3 index against rotating trust metadata.