Skip to main content

Crate rill_runtime

Crate rill_runtime 

Source
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§

HandlerIdentity
Identity reported by the runtime in IPC v2 handshake responses.
HandlerPackInspection
InvokeError
Typed invoke error.
LinearRegressionInvokeHandler
Business-neutral linear-regression handler used by the distributed runtime binary.
LoadedHandlerPack
LoadedModelPack
ModelPackInspection
RuntimeEngine
StderrLogSink
Default HostLogSink writing to stderr via eprintln!.
TrustStore
WasmInvokeHandler
Sandboxed WASM handler that implements crate::server::InvokeHandler.

Enums§

ArchiveError
EngineResponse
Engine-side response produced by RuntimeEngine. The IPC layer converts this to a v1 RuntimeResponse or v2 RuntimeResponseV2 based on the request’s api_version.
HandlerLoadError
Errors that arise while loading or preparing a handler for execution.
HandlerPackError
InvokeErrorKind
Stable categorisation of invoke failures.
ModelPackError
ReleaseIndexError

Constants§

CONFIGURE_FUEL
Fuel budget for a single configure call.
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 invoke call.
LINEAR_REGRESSION_CAPABILITY
MAX_DETAIL_BYTES
Maximum byte length of the host-only detail string. Guests can fully control this payload via the WIT handler-error variant, 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§

HostLogSink
Minimal host-side log sink for invoke diagnostics.
InvokeHandler
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