Version: mono-sync/0.2.0-draft
License: Mozilla Public License 2.0
monoprotocol is the canonical specification and reference implementation for Mono sync — a wire format and cryptographic rules for replicating user-owned data between devices. An identity owns sync objects; each object is replicated peer-to-peer under a transfer class that defines encryption, relay, gossip, and two-factor requirements. Product code (mesh, gateway, browser) lives in mono; this repository is the protocol layer only.
The Markdown specification in spec/ is normative. The Rust crate monoprotocol under rust/monoprotocol/ is a reference implementation that MUST match the spec and conformance/ fixtures. Implement in any language against the spec first; use the crate for interoperability testing or as a starting point.
- Normative spec — identifiers, transfer classes,
SyncEnvelopewire encoding (JSON and CBOR), HKDF key derivation, AES-256-GCM payloads, journal semantics, and capability grants (spec/PROTOCOL.md,spec/OBJECTS.md). - Conformance vectors — golden crypto outputs, JSON/CBOR envelope fixtures, and transfer-policy matrices so independent implementations can verify byte-for-byte compatibility (
conformance/,spec/CONFORMANCE.md). - Reference Rust crate — types, crypto, validation, and tests published as
monoprotocolon crates.io (MPL-2.0).
| Path | Role |
|---|---|
spec/PROTOCOL.md |
Normative protocol (wire, crypto, journal, capabilities) |
spec/OBJECTS.md |
Normative replicated object model |
spec/CONFORMANCE.md |
How to run and extend test vectors |
conformance/ |
Golden HKDF/AES-GCM vectors, JSON and CBOR wire fixtures |
rust/monoprotocol |
Published crate monoprotocol on crates.io (MPL-2.0) |
rust/monoprotocol-conformance |
Tests that load conformance/ fixtures |
cd rust
cargo test
cargo run -p gen-golden # regenerate conformance/golden and wire fixtures- Read
spec/PROTOCOL.mdandspec/OBJECTS.md. - Implement HKDF + AES-256-GCM exactly as in
spec/CONFORMANCE.md. - Pass all vectors in
conformance/golden/crypto.json. - Parse
conformance/json/*.jsonandconformance/cbor/*.cborinto your envelope type.
Product mesh, gateway, browser, and adapters remain in mono and depend on this protocol crate.
Related open source repos:
- The RV8 Browser Engine
- a browser engine built ourselves with servo + v8 with our in house optimisations
- Atmosphere
- an application that syncs clipboard, photos and files between devices natively. it also has handoff to drop what you are working on on one device and pick it up on another.
- Soliloquy
- an ultralight browser native operating system built on top of Alpine and RV8
- Crepuscularity
- one UI codebase for desktop, web, mobile, terminal, browser extensions, and embedded devices. Write React JSX or our lightweight DSL, get GPUI, Ratatui, SwiftUI, LVGL, and more. Batteries included.