# Y CRDT
A collection of Rust libraries oriented around implementing [Yjs](https://yjs.dev/) algorithm and protocol with
cross-language and cross-platform support in mind. It aims to maintain behavior and binary protocol compatibility with
Yjs, therefore projects using Yjs/Yrs should be able to interoperate with each other.
Project organization:
- **lib0** is a serialization library used for efficient (and fairly fast) data exchange.
- **yrs** (read: *wires*) is a core Rust library, a foundation stone for other projects.
- **yffi** (read: *wifi*) is a wrapper around *yrs* used to provide a native C foreign function interface. See
also: [C header file](https://github.com/y-crdt/y-crdt/blob/main/tests-ffi/include/libyrs.h).
- **ywasm** is a wrapper around *yrs* that targets WebAssembly and JavaScript API.
Other projects using *yrs*:
- [pycrdt](https://github.com/y-crdt/pycrdt) - Python bindings.
- [yrb](https://github.com/y-crdt/yrb) - Ruby bindings.
- [yr](https://github.com/y-crdt/yr) - R bindings.
- [ydotnet](https://github.com/y-crdt/ydotnet) - .NET/C# bindings.
- [yswift](https://github.com/y-crdt/yswift) - Swift bindings.
- [ykt](https://github.com/y-crdt/ykt) - Kotlin bindings.
- [ypy](https://github.com/y-crdt/ypy) - Python bindings (deprecated, use pycrdt instead).
## Feature parity among projects
| | yjs
(13.6) | yrs
(0.21) | ywasm
(0.18) | yffi
(0.21) | y-rb
(0.5) | y-py
(0.6) | ydotnet
(0.4) | yswift
(0.2) | y_ex
(0.6) |
|-----------------------------------------|:-------------------------------------------------:|:------------------------------------------:|:-----------------------------------------------------:|:---------------:|:------------------------------------------------:|:--------------------------------------------:|:-----------------:|:----------------:|:--------------:|
| YText: insert/delete | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| YText: formatting attributes and deltas | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| YText: embeded elements | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| YMap: update/delete | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| YMap: weak links | ✅
(weak-links branch) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| YArray: insert/delete | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| YArray & YText quotations | ✅
(weak links branch) | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ |
| YArray: move | ✅
(move branch) | ✅ | ✅ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ |
| XML Element, Fragment and Text | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ |
| Sub-documents | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Shared collections: observers | ✅ | ✅ | ✅
(incompatible with yjs) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ |
| Shared collections: recursive nesting | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Document observers | ✅ | ✅ | ✅
(incompatible with yjs) | ✅ | ✅ | ✅ | ✅ | | ✅ |
| Transaction: origins | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ |
| Snapshots | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Sticky indexes | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ |
| Undo Manager | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ |
| Awareness | ✅ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ✅ |
| Network provider: WebSockets | ✅
(y-websocket) | ✅
(yrs-warp) | ❌ | ❌ | ✅
(y-rb_actioncable) | ✅
(pycrdt-websocket) | ✅ | ❌ | ❌ |
| Network provider: WebRTC | ✅
(y-webrtc) | ✅
(yrs-webrtc) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
## Maintainers
- [Bartosz Sypytkowski](https://github.com/Horusiath)
- [Kevin Jahns](https://github.com/dmonad)
- [John Waidhofer](https://github.com/Waidhoferj)
## Sponsors