Skip to main content

onlyne_wire/
lib.rs

1//! `onlyne-wire` — the wire seam: length-prefixed JSON frames, and the local
2//! socket one daemon binds and every other process reaches.
3//!
4//! [`frame`] moves opaque serialisable values and holds no protocol semantics,
5//! so `onlyne-proto` stays free of tokio. [`socket`] owns the owner-tree
6//! endpoint: the machine-level runtime directory (`/tmp/onlyne-<uid>/`), the
7//! `<digest>.sock` a daemon binds there, the `<digest>.json` registration that
8//! names the surface serving it, and the owner-only modes around both.
9//!
10//! The frame API is re-exported at the crate root, because a caller that wants
11//! frames wants nothing else from this crate; the socket API stays behind its
12//! module, since `SocketEndpoint` and `bind_socket` read better named.
13
14pub mod frame;
15pub mod socket;
16
17pub use frame::{
18    FrameReader, MAX_FRAME_BYTES, MAX_PARTIAL_FRAME_BYTES, TooLarge, UnexpectedEof, is_bad_frame,
19    is_too_large, read_frame, write_frame,
20};