lonca_client/lib.rs
1//! A client of the Lonca daemon socket, for harnesses and runners.
2//!
3//! Only what a client needs: the protocol's request and response types and
4//! its number ([`PROTOCOL`]), the socket client with the checks that make
5//! sure the daemon is on the other end ([`trust`]), framing, timeouts and
6//! typed errors ([`client`]), and the human session file ([`session`]). No
7//! store, no policy evaluation, no daemon: a client is never a second writer.
8//!
9//! Versions: a change of [`PROTOCOL`] is a major version of this crate
10//! (while it is 0.x, a minor one). Fields added to a shape are not a
11//! change of the number. Pin an exact version and read the release notes
12//! when you move.
13
14pub mod client;
15pub mod protocol;
16pub mod session;
17pub mod sys;
18pub mod trust;
19
20pub use client::{CallError, Client, ErrorKind};
21pub use session::HumanSession;
22pub use trust::Trust;
23
24/// The runner-facing protocol number (`docs/protocol.md`), the one the
25/// daemon answers in `ping.protocol`. It goes up when a shape changes in a
26/// way a client must know about; adding a field does not count.
27pub const PROTOCOL: u32 = 1;