fugue library

The optimised block-based Fugue list CRDT.

A separate entrypoint from package:convergent/convergent.dart because Fugue uses its own logical Dot identity (a (replica, counter) pair), distinct from the HLC-based dots the rest of the library uses.

Classes

BoolCodec
bool passthrough.
Codec<T>
A reversible encoder for a value of type T to / from a JSON-compatible representation.
Dot
A logical (Lamport-style) identifier for one element of a Fugue list.
DoubleCodec
double passthrough. Accepts any JSON number on decode so that 4 and 4.0 are interchangeable on the wire.
Fugue<T>
The optimised, run-length ("waypoint") Fugue list CRDT — a faithful implementation of Algorithm 1 (Weidner & Kleppmann, TPDS 2025) that stores contiguously-typed runs as single blocks instead of one node per element.
FugueCodec<T>
JSON codec for a Fugue list, matching the library's Codec convention.
FugueInsert<T>
An insert op — see FugueOp.insert.
FugueOp<T>
One operation in a Fugue.applyOps batch.
FugueRemoveAt<T>
A remove op — see FugueOp.removeAt.
FugueTextBinaryCodec
Compact, fast binary codec for a text Fugue (Fugue<String>).
IntCodec
int passthrough.
JsonCodec<T>
Identity codec for any value that is already JSON-compatible (Maps, Lists, primitives). Useful when T is itself a JSON payload, or when the caller has already converted T to / from JSON outside this layer.
LamportClock
A per-replica Lamport clock that mints Dots for local edits.
StringCodec
String passthrough.

Enums

Side
Side of a parent a Fugue tree node attaches to.