ycpp is a Yjs-compatible CRDT library in C++23, for desktops and microcontrollers.
A CRDT lets several people edit the same document at once, each on their own copy. The copies exchange small updates and always end up identical, with no server deciding who wins. ycpp reads and writes the same updates as Yjs 13, so it talks to Yjs in a browser, Yrs, pycrdt and y-websocket servers.
- You want to use ycpp: read Getting started, then Shared types and Syncing documents.
- You know Yjs: the names map one to one:
Y.Docisycpp::Doc,Y.MapisMapRef, and so on. Getting started has the table. - You target a microcontroller: read ycpp on small targets.
- You use Python: read The Python binding.
- You want to change ycpp: start with Architecture, then Data model and Integration.
- C++23. No exceptions, no RTTI, no threads, no iostreams. Errors are
std::expected. - Memory comes from a
std::pmr::memory_resourceyou choose, so a board can use a pool. - Every update is untrusted input. Malformed bytes come back as an error, never as a half-applied document.
- Compatibility is tested, not assumed. Sessions recorded with real Yjs are replayed through ycpp, and the encoded documents must match byte for byte.
:caption: User guide
:maxdepth: 1
guide/getting-started
guide/shared-types
guide/events
guide/undo
guide/sync
guide/snapshots
guide/embedded
guide/python
:caption: Design
:maxdepth: 1
design/architecture
design/data-model
design/integration
design/deletes-and-gc
design/encoding
design/text
design/index-and-search
design/testing