1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! sui-daemon-frame — async frame codec for the rkyv-over-UDS local protocol.
//!
//! ## Wire format
//!
//! ```text
//! [magic : 4B = "SUI1"] [len : 4B u32 LE] [body : N bytes of rkyv-archived WireFrame]
//! ```
//!
//! The magic + length prefix is what lets a misaligned reader fail fast.
//! rkyv's own validation pass (`rkyv::access`) catches body-shape errors;
//! this codec only enforces the framing envelope.
//!
//! ## Scope
//!
//! This crate is **transport-agnostic**: it codes against `tokio::io::Async{Read,Write}`,
//! so the same primitives work for `UnixStream`, `TcpStream`, in-memory
//! `DuplexStream` (great for tests), or any future Bytes-stream abstraction.
//!
//! ## Reuse surface
//!
//! - `sui-daemon::graph_server` — reads frames from each accepted client.
//! - `sui-daemon-client` — writes requests + reads responses on a single
//! multiplexed connection.
//! - Tests across the workspace — drive `DuplexStream` end-to-end without
//! touching the filesystem.
//! - Future fuzzers — call [`read_frame`] on arbitrary bytes and assert
//! only framing-level invariants (rkyv validation is downstream).
pub use ;
pub use FrameError;
// Re-export the wire frame type so callers don't need both crate deps for
// the common case of "give me a frame, send me a frame."
pub use WireFrame;