y-crdt / y-crdt

Rust port of Yjs

Home Page:https://docs.rs/yrs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Rust port of Yjs

https://docs.rs/yrs/

License:Other


Languages

Language:Rust 74.0%Language:C++ 17.8%Language:C 4.8%Language:JavaScript 3.3%Language:CMake 0.1%