Files
leleka/crates/runtime-client/src/lib.rs
T
Pavlo RatushnyiandClaude Sonnet 5.5 c9aad38caa refactor: extract the runtime gRPC client into leleka-runtime-client and add GrpcBackend
proto/runtime.proto, the wire conversions and the validated RuntimeClient move out of
strata-desktop-core so strata-next can use them; strata-desktop-core re-exports them
unchanged. GrpcBackend implements the Backend contract by attaching to a runtime an
operator already loaded (no Load/Unload RPC), re-reading epoch and handle before every
generation, and ending a generation without a terminal event on any transport or frame
error. 9 loopback HTTP/2 tests with a scripted runtime server.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:42:11 +02:00

25 lines
1.0 KiB
Rust

//! The client side of the `leleka.runtime.v1` gRPC contract between a gateway and `leleka-inference`.
//!
//! * [`proto`]: the generated wire messages and both service stubs (the server implementation lives in
//! `strata-desktop-core`);
//! * [`convert`]: backend-contract <-> wire conversions and the credential / loopback rules;
//! * [`client`]: [`client::RuntimeClient`], one authenticated channel whose every answer is validated
//! (epochs, sequence numbers, a terminal frame before end of stream);
//! * [`backend`]: [`backend::GrpcBackend`], a [`leleka_backend_api::Backend`] that attaches to a runtime
//! some operator already loaded, so a gateway can drive the Rust engine through the same trait the
//! in-process backends implement.
//!
//! No CUDA, model, Strata or Python dependency.
pub mod backend;
pub mod client;
pub mod convert;
pub mod proto {
tonic::include_proto!("leleka.runtime.v1");
}
pub const PROTOCOL_VERSION: u32 = 1;
pub const MESSAGE_LIMIT: usize = 2 * 1024 * 1024;
pub const FRAME_LIMIT: usize = 64 * 1024;