Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/synapse/blob/main/crates/synapse-wire/src/lib.rs # synapse A component of the AienOS ecosystem. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `synapse / crates / synapse-wire / src / lib.rs` 34 lines ยท 1735 bytes Raw Blame History 1 //! Synapse wire protocol (ADR 0003 section 8 crate `synapse-wire`, step G1). 2 //! 3 //! * [`frame`]: length-prefixed binary frames (hello, have, want, chunk, submit, accepted, 4 //! refused) with one canonical encoding each, and an untrusted-input decoder that checks 5 //! every declared length against a cap before it allocates or reads, and refuses anything 6 //! else with a typed [`frame::WireRefusal`]. 7 //! * [`transport`]: framed connections over any reliable byte stream (Unix socket, TCP). 8 //! * [`ring`]: a shared-memory ring for local agents (step G3, experiment X5): two 9 //! single-producer, single-consumer rings in a sealed shared region, safe against a hostile 10 //! peer, joined into a byte stream that carries the same frames. 11 //! * [`session`]: have-want chunk negotiation (only blobs the server lacks cross the wire) 12 //! and change submission authorised by a capability chain (step F1), admitted by the 13 //! group-commit store and acknowledged once durable. 14 //! * [`fuzz`]: the in-repository coverage-guided fuzzer for the frame decoder, with 15 //! [`probe`] supplying the edge feedback. 16 //! * [`testkit`]: deterministic fixtures for tests, the fuzz seed corpus, and benchmarks. 17 18 pub mod frame; 19 pub mod fuzz; 20 pub mod probe; 21 pub mod ring; 22 pub mod session; 23 #[cfg(all(target_os = "linux", target_pointer_width = "64"))] 24 mod shm; 25 pub mod testkit; 26 pub mod transport; 27 28 pub use frame::{ 29 decode_frame, encode_frame, Frame, FrameBody, FrameKind, WireLimits, WireRefusal, 30 DEFAULT_MAX_FRAME_BODY, FRAME_HEADER_LEN, 31 }; 32 pub use ring::{RingConfig, RingReceiver, RingRefusal, RingRegion, RingSender, RingStream, Side}; 33 pub use session::{ServerConfig, SubmitReport, WireClient, WireServer}; 34 pub use transport::FrameConn;