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 - Stderr
LogSink - Default
HostLogSinkwriting to stderr viaeprintln!. - Trust
Store - Wasm
Invoke Handler - Sandboxed WASM handler that implements
crate::server::InvokeHandler.
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
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.
Traits§
- Host
LogSink - Minimal host-side log sink for invoke diagnostics.
- Invoke
Handler - Consumers can implement this trait to add business-specific invocation logic.
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 - verify_
release_ index