Reimagine state management with CRDTs. Make your app collaborative effortlessly.
Find a file
Zixuan Chen d942e3d7a2
Feat: Peritext-like rich text support (#123)
* feat: richtext wip

* feat: add insert to style range map wip

* feat: richtext state

* fix: fix style state inserting and style map

* fix: tiny vec merge err

* fix: comment err

* refactor: use new generic-btree & refine impl

* feat: fugue tracker

* feat: tracker

* feat: tracker

* fix: fix a few err in impl

* feat: init richtext content state

* feat: refactor arena

* feat: extract anchor_type info out of style flag

* refactor: state apply op more efficiently
we can now reuse the repr in state and op

* fix: new clippy errors

* refactor: use state chunk as delta item

* refactor: use two op to insert style start and style end

* feat: diff calc

* feat: handler

* fix: tracker checkout err

* fix: pass basic richtext handler tests

* fix: pass handler basic marking tests

* fix: pass all peritext criteria

* feat: snapshot encoding for richtext init

* refactor: replace Text with Richtext

* refacotr: rm text code

* fix: richtext checkout err

* refactor: diff of text and map

* refactor: del span

* refactor: event

* fix: fuzz err

* fix: pass all tests

* fix: fuzz err

* fix: list child cache err

* chore: rm debug code

* fix: encode enhanced err

* fix: encode enchanced

* fix: fix several richtext issue

* fix: richtext anchor err

* chore: rm debug code

* fix: richtext fuzz err

* feat: speedup text snapshot decode

* perf: optimize snapshot encoding

* perf: speed up decode & insert

* fix: fugue span merge err

* perf: speedup delete & id cursor map

* fix: fugue merge err

* chore: update utils

* perf: speedup text insert / del

* fix: cursor cache

* perf: reduce conversion by introducing InsertText

* perf: speed up by refined cursor cache

* chore: update gbtree dep

* refactor(wasm): use quill delta format

* chore: fix warnings
2023-10-29 14:02:13 +08:00
.devcontainer chore: add dev container 2022-11-18 00:48:18 +08:00
.github/workflows Refactor: rm legacy code (#97) 2023-07-31 11:49:55 +08:00
.vscode Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
crates Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
docs docs: add comment for last&end 2023-02-09 16:30:22 +08:00
loro-js Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
scripts
supply-chain
.editorconfig
.gitignore Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
Cargo.lock Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
Cargo.toml Perf: speed up utf16 and wasm (#90) 2023-04-03 09:29:25 +08:00
deno.jsonc Feat: Peritext-like rich text support (#123) 2023-10-29 14:02:13 +08:00
deno.lock bench(wasm): wasm bench 2022-12-09 10:46:36 +08:00
deny.toml
package.json Perf: speed up utf16 and wasm (#90) 2023-04-03 09:29:25 +08:00
pnpm-lock.yaml feat: event & wasm 2023-07-29 02:03:51 +08:00
pnpm-workspace.yaml Perf: speed up utf16 and wasm (#90) 2023-04-03 09:29:25 +08:00
README.md docs: update readme img 2023-02-08 11:06:12 +08:00
rust-toolchain

Loro

Loro is a fast CRDT framework with built-in end-to-end encryption ability.

It provides a set of data structures that can automatically sync without any conflict. With end-to-end encryption addon, all data can be encrypted without losing the ability to collaborate with the others. It aims to be the engine for building local-first software.

Why Loro

  • 🚀 It is pretty fast
  • 🔒 [WIP] Security built-in
  • 💻 Syncing data made easy
  • 📜 Preserve all history with low overhead
  • 🪐 [WIP] Time travel the history in milliseconds

Loro supports a variety of data structures and CRDT algorithms.

  • It supports the most used List, Map and Text.
  • [WIP] Peritext for fine-grind rich text operations
  • [TODO] Moveable Tree for directory-like moving operations
  • [WIP] Super fast version checkout and undo/redo

Credits

  • Automerge for its columnar encoding algorithm
  • Yjs for the efficient algorithm of merging blocks
  • Diamond-types for its idea of low-overhead merging algorithm
  • Ink & Switch for Local-first Software and Peritext