Skip to main content

rill_runtime/
lib.rs

1//! Independently distributable runtime for RillML.
2//!
3//! Implementation modules (`archive`, `handler`, `handler_package`, `package`,
4//! `server`) are `pub(crate)` so that downstream code — including the
5//! `rill-runtime` and `rill-pack` binaries, integration tests, and external
6//! crates — depends only on the top-level re-exports declared in this file.
7//! This avoids the dual-module-path problem where both
8//! `rill_runtime::handler::wasm::WasmInvokeHandler` and
9//! `rill_runtime::WasmInvokeHandler` would otherwise be part of the 1.x
10//! public API surface. Only the re-export path is stable.
11
12pub(crate) mod archive;
13pub(crate) mod handler;
14pub(crate) mod handler_package;
15pub(crate) mod package;
16pub(crate) mod server;
17
18pub use archive::{
19    ArchiveError, ReleaseIndexError, TrustStore, canonical_json, sign_release_index,
20    verify_release_index,
21};
22pub use handler::builtin::{LINEAR_REGRESSION_CAPABILITY, LinearRegressionInvokeHandler};
23#[cfg(feature = "wasm")]
24pub use handler::wasm::WasmInvokeHandler;
25#[cfg(feature = "wasm")]
26pub use handler::wasm::{
27    CONFIGURE_FUEL, EPOCH_DEADLINE, EPOCH_TICK_INTERVAL, INVOKE_FUEL, MAX_IO_BYTES,
28    MAX_MEMORY_BYTES, MAX_TABLE_ELEMENTS,
29};
30pub use handler::{HandlerIdentity, HandlerLoadError, effective_capabilities};
31pub use handler_package::{
32    HandlerPackError, HandlerPackInspection, LoadedHandlerPack, build_signed_handler_pack,
33    load_handler_pack,
34};
35pub use package::{
36    LoadedModelPack, ModelPackError, ModelPackInspection, build_signed_model_pack, load_model_pack,
37};
38pub use server::{
39    EngineResponse, HostLogSink, InvokeError, InvokeErrorKind, InvokeHandler, MAX_DETAIL_BYTES,
40    RuntimeEngine, StderrLogSink,
41};