// the find
josephg/diamond-types
The world's fastest CRDT. WIP.
Diamond Types is a Rust CRDT implementation for collaborative text editing, designed around a causal graph where each character gets a (client_id, sequence_number) identity. It benchmarks significantly faster than Automerge and Yjs, and ships WASM packages for browser and Node. Currently text-only; JSON/rich-data types are in-progress on a separate branch.
The run-length encoding layer (the `rle` crate) is the core performance trick — it compresses sequences of consecutive operations into spans, which is why merge is so much faster than naive CRDT implementations. Real benchmark datasets are included in the repo (automerge-paper, seph-blog1, etc.) so you can verify the perf claims yourself rather than trusting synthetic benchmarks. OT interop is explicitly supported, meaning simple peers that speak positional updates can talk to CRDT peers without full CRDT awareness. The WASM build path is first-class, not an afterthought — separate npm packages for browser and Node with documented example code.
The README says the Cargo package is 'quite out of date, both in terms of API and performance' — which is a red flag if you want to ship something today without building from source. Only plain text is supported; if your use case involves structured data, nested maps, or rich text, you're blocked until `more_types` lands and stabilizes. The WIP label is honest: there's no stability guarantee on the wire format or API, so you're taking on upgrade risk. Swift bindings exist but the build script and crate suggest they're experimental and not documented well enough for production use.