A collection of Rust libraries oriented around implementing Yjs 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 use to provide a native C foreign function interface. See also: C header file.
- ywasm is a wrapper around yrs that targets Web Assembly and JavaScript API.
Other projects using yrs:
- Supported collaborative types:
- Text
- text insertion (with variable offsets including configurable UTF-8, UTF-16 and UTF-32 mappings)
- embedded elements insertion
- insertion of formatting attributes
- observe events and deltas
- Map
- insertion, update and removal of primitive JSON-like elements
- recursive insertion, update and removal of other collaborative elements of any type
- observe events and deltas
- deep observe events bubbling up from nested collections
- Array
- insertion and removal of primitive JSON-like elements
- recursive insertion of other collaborative elements of any type
- observe events and deltas
- deep observe events bubbling up from nested collections
- move index positions
- XmlElement
- insertion, update and removal of XML attributes
- insertion, update and removal of XML children nodes
- observe events and deltas
- deep observe events bubbling up from nested collections
- XmlText
- insertion, update and removal of XML attributes
- text insertion (with variable offsets including configurable UTF-8, UTF-16 and UTF-32 mappings)
- observe events and deltas
- XmlFragment
- XmlHook (deprecated)
- Sub documents
- Transaction origin
- Undo/redo manager
- Encoding formats:
- lib0 v1 encoding
- lib0 v2 encoding
- Transaction events:
- on event update
- on after transaction