Skip to content
CAI
Software that uses CAICheck a score

loro-dev/loro

51.9

Adequate · 13 September 2026

134k

lines of production code

Rust

with TypeScript

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Loro is a high-performance, multi-language CRDT engine designed for real-time collaborative editing, supporting complex data structures such as rich text, movable lists, trees, and counters. It provides efficient synchronization and conflict resolution through a custom binary encoding format, with implementations available in both Rust and TypeScript to serve native and web environments. The system includes comprehensive tooling for performance benchmarking, fuzz testing, and memory profiling to ensure reliability and stability across diverse deployment scenarios.

How it got here

2022–2023 — Core architecture and rich text support

33 changes.

This period focused on establishing the project's foundational infrastructure, including repository scaffolding, dependency management, and comprehensive testing suites. Significant development effort was directed toward refactoring internal CRDT components, such as the RLE library and DAG management, while introducing new container types like MovableList, Tree, and Counter. The work also delivered robust rich text collaboration capabilities and a pure TypeScript runtime to enhance cross-platform compatibility.

2024 — Performance optimization and fuzzing infrastructure

26 changes.

This period focused on enhancing Loro's performance and reliability through extensive fuzzing infrastructure and benchmarking tools. Key developments included the introduction of DeltaRope for efficient text operations, optimized fractional indexing with jitter, and a new compact block encoding for change storage. The work also established robust testing coverage via comprehensive fuzz targets and WASM integration tests to ensure stability across core CRDT containers.

2025–2026 — Moonbit codec integration and bundler stability

11 changes.

This period focused on introducing a new Moonbit-based binary encoding codec and its associated CLI tools, alongside comprehensive fuzzing and golden-generation tests to ensure consistency with the Rust implementation. Significant effort was also directed toward stabilizing the WebAssembly ecosystem through a new CLI for artifact management and extensive smoke tests across various JavaScript bundlers. Additionally, the codebase expanded with a generic B-Tree crate, a TypeScript fractional-index package, and new examples demonstrating integration with React and esbuild.

Features

Add Loro-Quill rich text collaboration example

This change introduces a new example application in the \examples/loro-quill\ directory that demonstrates real-time collaborative editing using the Loro CRDT engine with the Quill rich text editor. The example features a Vue.js frontend with four synchronized editor instances, allowing users to test concurrent editing and conflict resolution. It includes a custom \QuillBinding\ implementation to bridge Quill's delta operations with Loro's text state, along with the necessary build configuration (Vite, WASM plugins) and assets to run the demo locally.

examples/loro-quill · high confidence

Add LoroCounter container and event subscription support

Users can now use a new LoroCounter container type to maintain incrementable/decrementable numeric values within a document, accessible via the LoroCounter struct with methods like increment, decrement, and get. Additionally, the public API now exposes a subscription mechanism allowing users to listen for local updates and document changes through DiffEvent and Subscriber types, enabling reactive handling of state modifications.

crates/loro/src · high confidence

Add Rsbuild-based React example for Loro

Added a new example in the \examples/test-rsbuild\ directory that demonstrates integrating Loro with a React application using the Rsbuild build tool. The example includes configuration for the Rsbuild bundler, a React component that initializes a Loro document and displays a shared message, and the necessary entry points and styles to run the demo.

examples/test-rsbuild · high confidence

Add benchmark utilities for simulating drawing, JSON, and spreadsheet workflows

The \crates/bench-utils\ crate now provides helper modules to generate and normalize synthetic actions for performance testing. It includes \draw.rs\ for simulating drawing operations (paths, text, rectangles, moves), \json.rs\ for JSON-like data mutations (maps, lists, text), and \sheet.rs\ for spreadsheet-like operations (rows, columns, values), all implementing the \ActionTrait\ to normalize inputs against specific limits. The \lib.rs\ module exposes generic action generation functions (\gen\_realtime\_actions\, \gen\_async\_actions\) and a \SyncKind\ enum to support various synchronization scenarios in benchmarks.

crates/bench-utils · high confidence

Add esbuild-based bug reproduction example for LoroMap

A new example located at examples/test-esbuild has been added to reproduce and test a specific issue with LoroMap when bundled with esbuild. This example includes a Node.js server that uses esbuild to bundle app.js into an ESM module, serving the resulting dist/app.js and index.html. It also provides a Playwright test script (test.js) that launches the server, navigates to the page, and verifies that window.LoroMap is available and functional, capturing console output and page errors to diagnose the bug.

examples/test-esbuild · high confidence

Added Deno-based fuzzing and memory profiling scripts

New scripts have been added to the project to automate fuzz testing and memory usage analysis. The \fuzz.ts\ script allows users to run cargo fuzz targets against the library, while \mem.ts\ and \run\_mem.ts\ provide a framework for executing memory profiling tasks and parsing the resulting byte-count metrics from dhat output.

crates/loro-internal/scripts · high confidence

Added example programs for jitter analysis and API testing

The \crates/fractional\_index/examples\ directory now includes three new Rust programs: \jitter.rs\ calculates the collision probability threshold for different jitter levels, \size.rs\ benchmarks the byte size and compression efficiency of fractional indices with varying jitter, and \npm\_fixture.rs\ generates a comprehensive JSON fixture exercising the \FractionalIndex\ API (including \new\, \new\_between\, \generate\_n\_evenly\, and various jitter-based constructors) to support TypeScript package testing.

_crates/fractional\index/examples · high confidence

Added fuzzing targets for draw and JSON examples

New fuzzing targets have been added for the draw and JSON example modules, enabling automated fuzz testing of their respective action sequences. A .gitignore file has also been added to exclude fuzzing artifacts such as corpus, artifacts, and coverage data from version control.

crates/examples/fuzz · high confidence

Added loro-wasm-tools CLI for WebAssembly artifact management

A new command-line utility has been added to help manage WebAssembly artifacts for loro-wasm. It provides commands to generate source maps, split DWARF debug sections into separate companion files, strip debug information, and remove custom sections from Wasm binaries, facilitating better debugging and optimization of the compiled output.

crates/loro-wasm-tools · high confidence

Introduce @loro-dev/fractional-index TypeScript package

A new TypeScript package, @loro-dev/fractional-index, is now available to generate compact, lexicographically sortable string positions. This implementation mirrors the Rust \loro\_fractional\_index\ crate, ensuring byte-for-byte compatibility with its \Display\ output. The package provides a public API that accepts and returns canonical uppercase hex strings, allowing indexes to be easily stored, compared, serialized, and used as object or map keys. Key features include creating indexes before, after, or between existing ones, generating evenly spaced indexes, and optional jitter support for randomization. The package has no runtime dependencies and outputs ESM with TypeScript declarations.

packages/fractional-index · high confidence

Introduce Awareness and Ephemeral Store APIs for real-time peer state

The WASM bindings now expose \Awareness\ and \EphemeralStore\ classes, enabling applications to synchronize transient peer information such as cursor positions, selections, and user names across connected clients. The \Awareness\ component tracks ephemeral state with configurable timeouts and provides methods to encode, apply, and query peer states, while the \EphemeralStore\ offers a simple key-value store for temporary data that automatically cleans up outdated entries.

crates/loro-wasm/src · high confidence

Introduce MemKvStore with SSTable backend and LZ4 compression

The \crates/kv-store/src\ module now implements a new in-memory key-value store (\MemKvStore\) backed by Sorted String Tables (SSTables). This change introduces the core binary format for SSTables, including block structures (Normal and Large Value blocks), metadata handling, and LZ4 compression support. It also adds a \MergeIterator\ for combining multiple SSTable iterators, enabling efficient scanning and merging of key-value data across multiple tables.

crates/kv-store/src · high confidence

Introduce generic B-Tree crate with Rope, OrdTreeMap, and OrdTreeSet

The new \crates/generic-btree\ crate provides a pure-safe B-Tree implementation designed to optimize Loro CRDT components. It exposes a generic \BTree\ core along with specialized data structures: a \Rope\ for efficient string editing, and \OrdTreeMap\/\OrdTreeSet\ for ordered key-value and key-only storage. The implementation includes internal optimizations such as a \GapBuffer\ for local editing and a \LengthFinder\ to reduce memory usage during snapshot operations.

crates/generic-btree · high confidence

Introduce pure TypeScript Loro runtime

loro.js is now available as a pure TypeScript implementation of the Loro binary format and CRDT runtime, providing wire and API compatibility with the existing \loro-crdt\ package without requiring WebAssembly. This new runtime targets ES2022 and includes full support for document synchronization, text navigation, and the complete suite of container types (Map, List, MovableList, Text, Tree, Counter, and nested containers). It also exposes low-level binary format readers and writers via the \loro.js/codec\ entry point, allowing developers to read and rewrite the Loro binary format directly in TypeScript.

loro-js · high confidence

Introduces configurable default rich text styles

The richtext container now supports a \StyleConfigMap\ that defines default configurations for common text styles such as bold, italic, underline, link, highlight, comment, and code. This allows the system to automatically apply specific expansion behaviors (e.g., whether a style expands after insertion or remains fixed) when these styles are applied, providing a consistent baseline for rich text formatting without requiring explicit configuration for every operation.

crates/loro-internal/src/container/richtext · high confidence

Introduction of DeltaRope data structure for efficient text operations

The delta crate now includes a new DeltaRope implementation, a rope-like data structure built on a generic B-tree, designed to handle text deltas with efficient composition and manipulation. This addition introduces core components such as DeltaItem (representing retain, replace, and delete operations), DeltaRopeBuilder, and specialized types like TextChunk and ArrayVec to manage text content and attributes. The change also includes a fuzzing harness for operational transformation (OT) consistency checks and benchmarks for rope performance, providing a foundation for high-performance text synchronization and editing features.

crates/delta · high confidence

Introduction of Movable List operations and internal op structures

The list container now supports a 'Movable' variant, introducing specific operations for moving elements (Move), setting values by ID (Set), and applying rich text styles (StyleStart/StyleEnd) alongside standard insert and delete actions. This change adds the \list\_op.rs\ module defining \ListOp\ and \InnerListOp\ enums, which handle these new capabilities and include logic for estimating storage size based on the container type (MovableList, List, or Text).

crates/loro-internal/src/container/list · high confidence

Introduction of Rich Text Container with Style Expansion Logic

The \crates/loro-internal/src/container\ module now includes a new \richtext.rs\ file that implements the core data structures for rich text support. This change introduces \RichtextSpan\ and \Style\ types to handle text attributes and enables users to apply styles to text segments. The implementation includes logic for \ExpandType\ (Before, After, Both, None) to control how styles propagate when new text is inserted adjacent to styled content, ensuring consistent formatting behavior during collaborative editing.

crates/loro-internal/src/container · high confidence

Introduction of StrArena for efficient Unicode-aware string storage

A new \StrArena\ component has been added to the internal arena module to manage string data with optimized Unicode indexing. This addition enables efficient allocation and slicing of strings based on Unicode code points rather than raw bytes, supporting features like rich text manipulation by maintaining parallel byte, UTF-16, and Unicode length metrics. The implementation includes checkpoint and rollback capabilities, allowing for atomic updates with conditional rollback, which is critical for maintaining data integrity during collaborative editing operations.

crates/loro-internal/src/arena · high confidence

Introduction of internal diff algorithm module with timeout support

The \crates/loro-internal/src/diff\ directory now contains the internal implementation for text diffing, including a new \diff\_impl.rs\ file that adapts Myers' algorithm and a \LICENSE\ file for the Apache 2.0 licensed code. This module introduces \UpdateOptions\ allowing users to configure a \timeout\_ms\ for diff computations and a \use\_refined\_diff\ flag, enabling controlled performance and timeout handling during text updates.

crates/loro-internal/src/diff · high confidence

Introduction of movable tree data structure with fractional indexing

The tree container now supports movable nodes, allowing tree elements to be created, moved under new parents, or deleted. This capability is implemented via a new \TreeOp\ enum that utilizes \FractionalIndex\ to determine child ordering, alongside a new \BoolRleVec\ for efficient history tracking and a \TreeLinearHistory\ structure to manage operation effects.

crates/loro-internal/src/container/tree · high confidence

New DAG iteration and visualization utilities

The \crates/loro-internal/src/dag\ module now includes new internal utilities for traversing and visualizing the Directed Acyclic Graph (DAG) of operations. A new \iter.rs\ file adds \DagIterator\ and \DagIteratorVV\ to traverse nodes in causal order using version vectors and heaps, and \DagCausalIter\ to visit specific ID spans. A new \mermaid.rs\ file provides a \dag\_to\_mermaid\ function that generates Mermaid flowchart diagrams of the DAG structure for debugging. These changes are accompanied by a comprehensive \test.rs\ file with fuzzing and unit tests for the DAG logic, and a \test.excalidraw\ file storing visual test diagrams.

crates/loro-internal/src/dag · high confidence

New MoonBit encoding codec fuzzing and golden-generation examples

Added three new Rust examples in the \crates/loro/examples\ directory to validate the MoonBit-based encoding codec primitives: \moon\_golden\_gen\ generates deterministic random Loro documents and exports them to FastUpdates, JsonSchema, FastSnapshot, and deep JSON for baseline comparison; \moon\_jsonschema\_fuzz\ randomly generates Loro operations, exports JsonSchema updates, invokes the MoonBit CLI to encode them into binary FastUpdates, and validates that importing the blob back into Rust matches the original state; \moon\_snapshot\_fuzz\ generates random operations, exports a FastSnapshot, uses the MoonBit CLI to decode it into deep JSON, and verifies the result matches Rust's \get\_deep\_value()\. These tools serve as semantic tests for the MoonBit codec integration, ensuring consistency between Rust and MoonBit encoding/decoding paths.

crates/loro/examples · high confidence

New Moonbit Loro Codec library and CLI tool

This change introduces a new Loro binary encoding codec implementation in Moonbit, located in \moon/loro\_codec/\, along with a corresponding command-line utility in \moon/cmd/loro\_codec\_cli/\. The library provides core encoding and decoding primitives for Loro's binary format, including support for ChangeBlocks, SSTables, and various value types (Maps, Lists, Text, Trees, etc.), with specific attention to endianness and integer encodings (ULEB128/SLEB128) to ensure compatibility with the existing Rust implementation. The CLI tool enables users to transcode Loro documents, decode updates to JSON, export and import JSON schemas, and export deep JSON snapshots, facilitating interoperability and debugging between Moonbit and Rust-based Loro systems.

moon · high confidence

New allocation algorithms and ephemeral store infrastructure

The internal crate now includes new BFS and DFS-based allocation algorithms for calculating critical versions in the document DAG, alongside a new \EphemeralStore\ for managing transient peer presence data (replacing the deprecated \Awareness\ type). These changes introduce the foundational structures for improved version resolution and real-time collaboration features, while also adding fuzzing targets to test these new internal components.

crates/loro-internal/src · high confidence

New benchmarking and demonstration examples for encoding, trees, and events

Added a suite of new Rust examples in the \crates/loro-internal/examples\ directory to demonstrate core Loro capabilities and benchmark performance. These include \automerge\_x100.rs\ and \encoding.rs\ for measuring snapshot and update encoding/decoding speeds and sizes, \tree.rs\ for demonstrating tree creation and movement, \event.rs\ for showing deep subscription handling, and \many\_actors.rs\ for testing concurrent actor scenarios. These files provide concrete usage patterns for the \LoroDoc\ API and performance baselines for encoding modes.

crates/loro-internal/examples · high confidence

New benchmarking and fuzzing examples for Loro

Added new example modules in \crates/examples/src\ to support performance benchmarking and fuzz testing. This includes a \draw\ actor for simulating collaborative drawing actions (paths, text, rects), a \json\ actor for testing standard JSON-like operations on lists, maps, and text, and a \list\ module implementing traits for both \LoroList\ and \LoroMovableList\ to facilitate movable list benchmarks. Additionally, \sheet.rs\ provides utilities for initializing large spreadsheet-like structures, \utils.rs\ contains benchmarks for the new fast snapshot and shallow snapshot (GC) modes, and \lib.rs\ defines the \ActorTrait\ and workflow runners used to execute these tests across multiple peers.

crates/examples/src · high confidence

New common crate with foundational types and error handling

The \loro-common\ crate has been introduced to centralize core data structures and error definitions. It provides the \LoroValue\ enum (supporting strings, lists, maps, and binary data) and specific wrapper types like \LoroStringValue\ and \LoroBinaryValue\. The crate defines the \ID\ struct for operation identification, \PeerID\ for client identification, and \InternalString\ for efficient string handling. It also establishes the \LoroError\ and \LoroTreeError\ enums for comprehensive error reporting, including specific variants for decoding issues, transaction conflicts, and tree manipulation errors.

crates/loro-common/src · high confidence

New dev-utils crate for test logging and memory monitoring

A new \crates/dev-utils\ library has been added to support development and testing workflows. It introduces a \setup\_test\_log\ function that configures tracing with both console output and Chrome DevTools-compatible JSON traces when the \DEBUG\ environment variable is set. Additionally, it implements a global memory allocator wrapper (\Counter\) that tracks total allocated bytes, exposing a \get\_mem\_usage\ function and a \ByteSize\ type for displaying memory consumption in human-readable units (B, KB, MB, GB).

crates/dev-utils · high confidence

New developer tooling scripts for fuzzing, releases, and publishing

The repository now includes a suite of new scripts in the \scripts/\ directory to streamline development and release workflows. \cargo-fuzz-run.mjs\ provides a Node.js wrapper for running Rust fuzzing targets with configurable sanitizers, while \cargo-release.ts\ (Deno) automates Rust crate versioning with optimized exclusion logic. \publish-wasm-packages.mjs\ handles the publication of \loro-js\, \loro-wasm\, and \loro-wasm-map\ to npm, checking for existing versions to avoid conflicts. Additionally, \sync-loro-version.ts\ ensures version consistency across \package.json\ and \Cargo.toml\ files, and \run-js-doc-tests.ts\ executes TypeScript code blocks from documentation. A \deno.json\ configuration and corresponding lockfile support these Deno-based tools, and \install-dev-tools.sh\ assists in setting up required Rust development utilities.

scripts · high confidence

New diff calculators for Counter and Tree containers

Added new diff calculator implementations for Counter and Tree containers in the internal diff calculation module. The CounterDiffCalculator tracks counter operations and computes the net difference between version vectors, while the TreeDiffCalculator supports multiple modes (Crdt, Linear, ImportGreaterUpdates) to handle tree structure changes including create, move, and delete operations. These calculators enable proper diff generation for these container types when computing changes between document states.

_crates/loro-internal/src/diff\calc · high confidence

New internal state module with container store, mergeable container support, and analysis tools

The \crates/loro-internal/src/state\ directory now contains the core implementation for materialized document state, including a new KV-backed \ContainerStore\ for persisted snapshots, dedicated state handlers for maps, lists, movable lists, trees, counters, and richtext, and a \mergeable.rs\ module that resolves logical child edges for mergeable containers using deterministic IDs and parent map markers. A \DeadContainersCache\ tracks deletion liveness without caching entries that depend on mutable mergeable markers, and an \analyzer.rs\ module provides document introspection (container counts, sizes, and edit stats). The \container\_tree.rs\ module enables structured traversal of the document state into a sink for efficient serialization or inspection.

crates/loro-internal/src/state · high confidence

New performance benchmarks and profiling examples for Loro

Added a suite of new example programs in \crates/examples/examples\ to benchmark and profile Loro's performance characteristics. These include \b4\_bench\ for text editing and snapshot import/export speeds, \flat\_folder\ and \flat\_folder\_by\_map\ for large-scale tree and map operations (1M nodes, 100M ops), \large\_movable\_list\ for list performance and memory management, \mergeable\_notes\ comparing mergeable vs regular child containers, and \import\_batch\_perf\ for profiling batch import rollback bookkeeping. These examples provide developers with concrete metrics on execution time, memory usage, and snapshot sizes for various workloads.

crates/examples/examples · high confidence

Repository initialization and project scaffolding

The repository has been initialized with core project infrastructure, including an MIT license, a Rust toolchain configuration, and a pnpm workspace setup for managing the JS/WASM and Rust components. Development guidelines are established via AGENTS.md and CONTRIBUTING.md, while automated changelog generation is configured through git-cliff. Security and dependency hygiene are enforced via cargo-deny, and the project now includes a Deno lockfile for deterministic dependency resolution alongside a sponsorship configuration for Tana, Inc.

(repo-wide) · high confidence

Architecture

New internal encoding module with fast snapshot, shallow snapshot, and JSON schema support

The \crates/loro-internal/src/encoding\ directory has been reorganized into a dedicated module that centralizes Loro import/export formats. This change introduces new source files for \fast\_snapshot.rs\ (handling oplog, state, and GC block layouts), \shallow\_snapshot.rs\ (managing state-only and snapshot-at exports with style redaction), and \json\_schema.rs\ (providing JSON-based updates with optional peer compression). It also adds \arena.rs\ for columnar encoding of container IDs and positions, \value.rs\ for op/value type definitions, and \value\_register.rs\ for deduplication. Documentation files \AGENTS.md\ and \CLAUDE.md\ have been added to define the module's entry points, rules, and validation tests.

crates/loro-internal/src/encoding · high confidence

WASM package build pipeline and packaging structure reorganized

The \crates/loro-wasm\ directory has been restructured to support a multi-target build pipeline. New configuration files (\rollup.config.mjs\, \rollup.base64.config.mjs\) and a \deno.lock\ file establish the build environment, while \.gitignore\ and \.npmignore\ define artifact exclusions. Documentation files (\AGENTS.md\, \README.md\, \CHANGELOG.md\) provide guidelines for the new WASM-specific event handling, error reporting, and bundler compatibility (Vite, Webpack, esbuild). The \index.ts\ wrapper now exports the WASM bindings and includes deprecated aliases for backward compatibility.

crates/loro-wasm · high confidence

Behavioural changes

Bounded decoded-value cache prevents WASM memory growth

The container store now limits the number of lazily decoded container values cached in memory to 2048 entries (16 in tests) using a second-chance FIFO eviction policy. This change prevents unbounded memory retention when reading large documents, specifically addressing a WASM memory growth issue where walking over many containers could pin gigabytes of memory until the document is dropped. Evicted entries are re-decoded from the key-value store on subsequent access, trading a small decode cost for strict memory bounds.

_crates/loro-internal/src/state/container\store · high confidence

Improved WASM bundler compatibility and performance optimizations

The WASM build pipeline now includes dedicated patch scripts to ensure compatibility with various bundlers and runtimes. A new browser patch enables synchronous WASM loading via XMLHttpRequest to prevent circular chunk issues in Vite/Rolldown, while a bundler patch normalizes WASM module imports to support rsbuild, Bun, and Cloudflare Workers. Additionally, a container ID cache patch optimizes performance by caching the \id\ and \kind\ properties on JS wrappers, reducing redundant WASM calls during repeated access.

crates/loro-wasm/scripts · high confidence

Improved fractional index jitter for better ordering stability

The \fractional\_index\ crate now includes a new \jitter.rs\ module that provides methods for generating fractional indices with random jitter (e.g., \new\_jitter\, \generate\_n\_evenly\_jitter\). This change enhances the stability of element ordering in collaborative editing scenarios by reducing the likelihood of collisions when inserting items between existing ones, addressing issues identified in fix \#360.

_crates/fractional\index/src · high confidence

Internal refactoring of document state storage and string handling utilities

This change introduces a new internal key-value store wrapper (KvWrapper) to manage document state, replacing previous in-memory structures to support better snapshot import/export and garbage collection. It also adds a LazyLoad utility for deferred state resolution, refactors string handling with a new StringSlice type that distinguishes between Unicode and UTF-16 lengths (crucial for WASM compatibility), and implements optimized UTF-16 length counting. These updates improve internal performance and memory usage for snapshot operations and multi-threaded access, though they do not expose new public APIs.

crates/loro-internal/src/utils · high confidence

Introduce new CRDT rope and ID-to-cursor tracking for rich text

The rich text tracker now uses a new \CrdtRope\ data structure to manage text content and a dedicated \IdToCursor\ mapping to efficiently track operation IDs against rope positions. This change replaces the previous implementation, introducing specific optimizations such as fragment merging for contiguous operations and batched updates to improve performance during large transactions and text imports.

crates/loro-internal/src/container/richtext/tracker · high confidence

New compact block encoding for change storage

The change store now uses a new binary block format to encode and decode changes, replacing the previous structure. This new format groups changes into blocks and uses efficient encoding (LEB128, RLE, DeltaOfDelta) for metadata like timestamps, commit messages, and dependencies, as well as for the operations themselves. This change aims to reduce the size of stored changes and improve import/export performance.

_crates/loro-internal/src/oplog/change\store · high confidence

New delta structures for map, text, tree, and list containers

The \crates/loro-internal/src/delta\ module has been restructured with new files defining the internal delta representations for all container types. \map.rs\ and \map\_delta.rs\ introduce \MapDiff\ and \MapDelta\ to track added, updated, and deleted entries with composition logic. \text.rs\ adds \StyleMeta\ and \TextMeta\ to handle rich text styling and metadata within delta items. \tree.rs\ defines \TreeDiff\ and \TreeDelta\ to represent structural changes like create, move, and delete operations in movable trees, including old parent/index tracking. \movable\_list.rs\ and \seq.rs\ provide \MovableListInnerDelta\ and the generic \Delta\/\DeltaItem\ structures for sequence-based containers, enabling efficient composition and transformation of list and text changes.

crates/loro-internal/src/delta · high confidence

New internal change storage and DAG management architecture

The internal operation log has been restructured to use a new \ChangeStore\ backed by a KV store for persistent, block-encoded change history, replacing the previous in-memory list. A new \AppDag\ component now manages the causal dependency graph, supporting lazy loading of nodes and shallow snapshots to reduce memory retention. Additionally, a \PendingChanges\ system has been introduced to handle out-of-order remote updates and support atomic import rollbacks, ensuring data consistency during concurrent imports.

crates/loro-internal/src/oplog · high confidence

RLE library refactored to use generic traits and SmallVec

The \crates/rle\ library has been restructured to replace the previous monolithic \RleVec\ implementation with a modular, trait-based architecture. The core data structure now utilizes \SmallVec\ for improved memory efficiency, and the previous \HasLength\ and \Mergable\ traits have been expanded into a comprehensive set of traits (\Sliceable\, \HasIndex\, \RleCollection\, etc.) defined in \rle\_trait.rs\. This change introduces a new \RleVecWithLen\ wrapper to track atom lengths separately from merged element counts, and updates the public API to expose these new traits and the \RleVecWithLen\ type, fundamentally changing how run-length encoded collections are constructed and iterated.

crates/rle/src · high confidence

Refactored frontier representation for deterministic encoding and performance

The internal representation of version frontiers has been refactored to use a new \Frontiers\ enum and \InternalMap\ structure. This change ensures that frontier encoding is deterministic, meaning the same logical state will always produce the same serialized output, which is critical for consistent replication and diffing. Additionally, the new data structure improves performance by optimizing how frontier IDs are stored and iterated, replacing the previous implementation.

crates/loro-internal/src/version · high confidence

Refactored internal handler implementations for trees, movable lists, and text

The internal handler logic in \crates/loro-internal/src/handler\ has been restructured to improve stability and performance. The \tree.rs\ handler now uses a dedicated \TreeInner\ struct to manage parent-child relationships and node metadata, supporting fractional indexing for child ordering. A new \movable\_list\_apply\_delta.rs\ module implements delta application for movable lists, handling insertions, deletions, and moves with proper container ID remapping. Additionally, \text\_update.rs\ introduces \DiffHook\ and \DiffHookForLine\ structures to efficiently apply text diffs, including line-based updates, to the text handler.

crates/loro-internal/src/handler · high confidence

Removal of legacy core modules in loro-core

The \id.rs\, \lib.rs\, \rle.rs\, and \store.rs\ files have been deleted from the \loro-core\ crate. This removes the previous definitions for \ClientID\, \ID\, \RleArray\, and the \Store\ struct, indicating a structural refactor where these components are no longer part of this specific crate's public or internal API surface.

crates/loro-core · high confidence

Fixes

Fuzzing crate now pins the nightly Rust toolchain

The \crates/fuzz\ directory now includes a \rust-toolchain\ file that explicitly sets the Rust toolchain to \nightly\. This ensures that fuzzing builds and runs use the nightly compiler version, providing consistency for fuzzing-specific features or dependencies that may require it.

crates/fuzz · high confidence

Test coverage

Add Loro bundler smoke tests for WASM compatibility; Added Deno integration tests for Loro WASM; Added benchmark suite for FractionalIndex operations; Added benchmarks for text, list, fork, and mergeable container performance; Added comprehensive benchmark suite for encoding, events, JSONPath, and CRDT operations; Added integration tests for detached editing, JSONPath, redaction, shallow snapshots, and undo; Added integration tests for mergeable container behavior; Added regression test for JSON fuzzing failure; Added snapshot tests for Loro WASM diff, JSON, and tree operations; Added tests for MemKvStore import/export and SSTable fixture loading; Added tests for import atomicity, op-count consistency, and replay-base selection; Expanded contract test coverage for Loro core features; Expanded fuzz testing for CRDT operations and compatibility; Expanded fuzzing coverage for CRDT operations and data structures; Expanded fuzzing coverage for Counter, MovableList, and Tree containers; Expanded test coverage for Loro WASM bindings; Expanded test coverage for Loro core behaviors and cross-language interoperability; Expanded test coverage for internal Loro contracts and behaviors; New comprehensive fuzzing harness for Loro CRDTs.

Dependencies

Initial dependency lockfiles and manifest definitions for Rust and JavaScript packages

This change introduces the initial \Cargo.lock\ and \pnpm-lock.yaml\ files alongside the \Cargo.toml\ and \package.json\ manifests for the Loro workspace. It establishes the dependency graph for core Rust crates (including \loro-internal\, \loro-wasm\, \generic-btree\, and \loro-kv-store\) and the JavaScript \loro-crdt\ package, pinning specific versions for build tools, fuzzing utilities, and runtime dependencies.

(dependencies) · high confidence

Housekeeping

Internal crate scaffolding and documentation for loro-internal

The \crates/loro-internal\ directory has been initialized with core project files, including a \.gitignore\ to exclude \dhat-heap.json\ profiling artifacts, a \VERSION\ file setting the crate to 1.16.0, and a \deno.json\ defining development tasks for testing, fuzzing, and benchmarking. Additionally, \AGENTS.md\ and \Encoding.md\ provide essential documentation on the internal CRDT implementation, encoding schemas, and working rules for developers.

crates/loro-internal · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 52.

Lenses

  • Code Health 56
  • Architecture 99
  • Maturity 75
  • Readiness 73
  • Security 33
  • Domain Modelling 100

Changes since last survey

  • 300 commits — 193 feature/other, 107 fixes

By area

  • crates/loro-wasm — 93 commits
  • crates/loro-internal — 84 commits
  • (root) — 22 commits
  • crates/loro — 19 commits
  • .github/workflows — 18 commits
  • (repo) — 9 commits
  • crates/fuzz — 5 commits
  • loro-js/src — 3 commits
  • .changeset/eight-apples-confess.md — 2 commits
  • crates/kv-store — 2 commits
  • examples/bundler-smoke-tests — 2 commits
  • scripts/publish-wasm-packages.mjs — 2 commits
  • skills/loro — 2 commits
  • sponsorkit/sponsors.svg — 2 commits
  • .changeset/clean-map-changelog.md — 1 commit
  • .changeset/cold-dryers-pull.md — 1 commit
  • .changeset/fast-sstable-import.md — 1 commit
  • .changeset/fix-block-lamport-range-decode.md — 1 commit
  • .changeset/fix-sourcemap-package-boundary.md — 1 commit
  • .changeset/fix-undo-trim-empty-front-rows.md — 1 commit

Notable commits

  • fix: Fix EventHint merge bug (#763)
  • fix: Fix browser WASM loader for remapped bundler builds (#990)
  • fix: Fix bun bundle (#827)
  • fix: Fix(js): delete an entry in map should emit an event that set the field as undefined instead of null (#775)
  • fix: Merge pull request #777 from loro-dev/fix-c-warnings
  • fix: Merge pull request #782 from loro-dev/fix-local-events
  • fix: Revert "chore: changeset"
  • fix: Revert "fix: restore tree node to original parent when undoing delete (#918)"
  • fix: bench: add shallow snapshot export regression (#995)
  • fix: chore: fix ci rust release
  • fix: chore: fix ci script
  • fix: chore: fix clippy warnings
  • fix: ci: eh, fix a weird ci issue
  • fix: ci: fix clippy check (#727)
  • fix: ci: fix loro-wasm version sync
  • fix: ci: fix release_wasm
  • fix: ci: fix wasm npm publish
  • fix: ci: fix wasm publish by upgrading npm
  • fix: ci: fix wasm release workflow
  • fix: fix wasm pre-commit aliasing (#939)
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

loro-dev/loro was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d5da57dd2a91d735656808cbbe2a3f1c755c2441 — the exact code this score is about.
  • Scored under rubric-2026.09.9 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-7ba913814d4f.