Skip to main content

ssp2/
lib.rs

1//! # ssp2 — Syncular v2 wire codec (Rust POC)
2//!
3//! A fresh implementation of the SSP2 envelope, the SSG2 rows-segment format,
4//! the §2.4 row codec, §8 realtime control messages, and the §11 canonical
5//! JSON debug rendering — built **from `SPEC.md` alone** (no reference to
6//! the v1 Rust tree or the v2 TypeScript implementations) to prove the
7//! written protocol contract is language-neutral. Conformance is pinned by
8//! the golden vectors in `spec/vectors/`.
9
10pub mod blob_ref;
11/// §5.11 client-side encryption primitives (envelope, value serializer,
12/// AES-256-GCM). Gated on the `e2ee` feature.
13#[cfg(feature = "e2ee")]
14pub mod crypto;
15pub mod decode;
16pub mod encode;
17pub mod error;
18pub mod model;
19pub mod primitives;
20pub mod realtime;
21pub mod render;
22pub mod segment;
23pub mod stream;
24pub mod util;
25/// §5.11 X25519 sealed-box key wrapping (async-encryption utilities). Gated on
26/// the `e2ee` feature.
27#[cfg(feature = "e2ee")]
28pub mod wrap;
29
30pub use decode::decode_message;
31pub use encode::encode_message;
32pub use error::{DecodeError, ErrorCode};
33pub use model::{Frame, Message, MsgKind};
34pub use realtime::{
35    encode_presence_publish, parse_control, parse_control_value, render_control, ControlMessage,
36    PresenceKind,
37};
38pub use render::{render_message, render_rows_segment};
39pub use segment::{decode_rows_segment, encode_rows_segment, RowsSegment, SegmentRow};
40pub use stream::{MessageStreamScanner, ScannedMessage};