Build on the supported package contract
Use @absolutejs/sync-loro through its supported public entry points.
@absolutejs/sync-lorov0.0.5betaData & SyncLoro-backed collaborative-text CRDT adapter for @absolutejs/sync
bun add @absolutejs/sync-loroA Loro-backed collaborative-text CRDT for @absolutejs/sync, behind the same CrdtText / TextCrdtAdapter contract as the core's zero-dependency rgaText and @absolutejs/sync-yjs.
@absolutejs/sync/crdt ships a first-party RGA text CRDT that's great for offline-merge and moderate collaboration. Loro is a fast, Rust/wasm CRDT library; this adapter lets you swap it in without touching your call sites.
The serialized state is a base64 string of a Loro snapshot — JSON-safe for the sync engine's change feed. merge is commutative/associative/idempotent.
Implements TextCrdtAdapter from @absolutejs/sync/crdt: create, merge, empty, textOf. The replica argument is accepted for contract compatibility; Loro assigns a peer id internally.
Outcomes
Use @absolutejs/sync-loro through its supported public entry points.
Hardening checklist
Follow in order
Working example for Use.
import { loroText } from '@absolutejs/sync-loro';
// ...instead of: import { rgaText } from '@absolutejs/sync/crdt';
// Server — declare the CRDT field with this backend
engine.registerCrdt('doc', { state: loroText });
// Client — same hook, just pass the backend's factory
const doc = useCollaborativeText({
collection: 'doc',
field: 'state',
id: 'shared',
url,
create: (replica) => createLoroText(replica)
});Supported entry points declared by this package manifest.
Package entry point declared in package.json.
Scripts declared by this package manifest.