Loro is an open-source CRDT library for local-first and real-time collaborative software. A CRDT (conflict-free replicated data type) is a data structure whose copies can be edited independently, offline or at the same time, and that always merges to the same result without a central server deciding the order. Zixuan Chen and Leon Zhao created Loro in 2022.
An application keeps its shared state in a LoroDoc, which holds collaborative types: text and rich text, a movable list, a last-write-wins map for key-value pairs, and a movable tree for hierarchical data. Each copy exports its changes as binary updates; the application sends them over any channel, peer-to-peer or through a server, and the other copy imports them and reaches the same state. Text merging uses the Fugue algorithm, which reduces interleaving of concurrent edits. Loro keeps a full version history, like Git. It provides only the state layer: the application brings its own interface, authentication, storage and transport.
Loro can be used from Rust, JavaScript (through WebAssembly), Swift and Python. It is free and open source under the MIT license.