// the find
vlcn-io/cr-sqlite
Convergent, Replicated SQLite. Multi-writer and CRDT support for SQLite
CR-SQLite is a loadable SQLite extension that adds CRDT-based multi-writer replication to SQLite databases. You annotate tables with `crsql_as_crr`, then sync by exchanging changesets through a virtual `crsql_changes` table. It's aimed at local-first apps — offline editing, peer-to-peer sync, real-time collaboration — without a central server arbitrating writes.
The API surface is minimal and SQL-native: upgrading a table is one function call, and syncing is just INSERT/SELECT on a virtual table, so existing SQLite tooling keeps working. The extension loads into any language that has SQLite bindings (Python, Node, Rust, browser via WASM), so adoption doesn't require switching databases or ORMs. The implementation is backed by solid academic work on CRDTs and causally-ordered sets, not a hand-rolled LWW hack. There's a real correctness test suite in Python with prior-version compatibility checks, which matters a lot for a sync protocol.
Last push was October 2024 and the v2 roadmap (causal event log, manual conflict resolution, counter and rich-text CRDTs) appears stalled — several features marked as 'to be implemented' have been in that state for years. The CRDT model is last-write-wins by default for most column types, which is often wrong for business data where 'last write' depends on who had the newest clock, not who was right. Inserts into CRR tables are 2.5x slower than plain SQLite, which compounds if you have high write throughput on large tables. Schema migrations on CRR tables require wrapping every ALTER in begin/commit_alter calls — easy to forget, and forgetting corrupts sync state.