Skip to content

appflowy/y-crdt

 
 

Repository files navigation

Y CRDT

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 used to provide a native C foreign function interface. See also: C header file.
  • ywasm is a wrapper around yrs that targets WebAssembly and JavaScript API.

Other projects using yrs:

  • ypy - Python bindings.
  • yrb - Ruby bindings.

Feature parity with Yjs project

  • 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)
  • Subdocuments
  • Transaction origin
  • Undo/redo manager
  • Encoding formats:
    • lib0 v1 encoding
    • lib0 v2 encoding
  • Transaction events:
    • on event update
    • on after transaction

Maintainers

Sponsors

NLNET

Ably

Releases

No releases published

Packages

No packages published

Languages

  • Rust 74.0%
  • C++ 17.8%
  • C 4.8%
  • JavaScript 3.3%
  • CMake 0.1%