lattice_crdt- Version
View
lattice_crdton Hex- Provides
- Umbrella for core, counters, registers, sets, maps, sequence, and text
lattice / orientation
How lattice is organized into focused packages.
lattice is organized as a family of focused packages for CRDTs and their shared
infrastructure. You can depend on the lattice_crdt umbrella for the core
toolkit, or pick individual packages for a smaller dependency graph.
| Package | Version | Docs | What it provides |
|---|---|---|---|
lattice_crdt | API docs | Umbrella for core, counters, registers, sets, maps, sequence, and text | |
lattice_core | API docs | ReplicaId, VersionVector, DotContext — shared causal infrastructure | |
lattice_counters | API docs | GCounter, PNCounter | |
lattice_registers | API docs | LWWRegister, MVRegister | |
lattice_sets | API docs | GSet, TwoPSet, ORSet | |
lattice_maps | API docs | LWWMap, ORMap, Crdt dispatch | |
lattice_sequence | API docs | Generic ordered-list CRDT with move support | |
lattice_fugue | Unreleased | Not published yet | Non-interleaving sequence CRDT implementing Fugue |
lattice_text_core | API docs | Shared grapheme and range helpers for text CRDTs | |
lattice_text | API docs | Plain-text CRDT backed by lattice_sequence | |
lattice_text_fugue | Unreleased | Not published yet | Non-interleaving text CRDT backed by lattice_fugue |
lattice_presence | API docs | Distributed presence CRDT with topic/key/pid/meta tracking |
lattice_crdtlattice_crdt on Hexlattice_corelattice_core on HexReplicaId, VersionVector, DotContext — shared causal infrastructurelattice_counterslattice_counters on HexGCounter, PNCounterlattice_registersLWWRegister, MVRegisterlattice_setslattice_sets on HexGSet, TwoPSet, ORSetlattice_mapslattice_maps on HexLWWMap, ORMap, Crdt dispatchlattice_sequencelattice_sequence on Hexlattice_fuguelattice_text_corelattice_textlattice_text on Hexlattice_sequencelattice_text_fuguelattice_fuguelattice_presencelattice_presence on Hexgraph LR
lattice_counters --> lattice_core
lattice_fugue --> lattice_core
lattice_registers --> lattice_core
lattice_sequence --> lattice_core
lattice_sets --> lattice_core
lattice_maps --> lattice_core
lattice_maps --> lattice_counters
lattice_maps --> lattice_registers
lattice_maps --> lattice_sets
lattice_text --> lattice_core
lattice_text --> lattice_sequence
lattice_text --> lattice_text_core
lattice_crdt --> lattice_core
lattice_crdt --> lattice_counters
lattice_crdt --> lattice_registers
lattice_crdt --> lattice_sequence
lattice_crdt --> lattice_sets
lattice_crdt --> lattice_maps
lattice_crdt --> lattice_text
lattice_text_fugue --> lattice_core
lattice_text_fugue --> lattice_fugue
lattice_text_fugue --> lattice_text_core
lattice_presence
The only packages with no lattice package dependencies are lattice_core,
lattice_text_core, and lattice_presence. lattice_text_core depends only on
gleam_stdlib; lattice_core and lattice_presence also depend on
gleam_json.
In Gleam, imports come from the package name. Even when you install the umbrella
lattice_crdt, you import from the sub-package names:
import lattice_core/replica_idimport lattice_counters/g_counterimport lattice_sets/or_setimport lattice_maps/or_mapimport lattice_sequence/sequenceimport lattice_fugue/sequenceimport lattice_text/textimport lattice_text_core/graphemeimport lattice_text_fugue/textimport lattice_presence/presence_stateStart with lattice_crdt if you are getting started, prototyping, or using
CRDTs from multiple categories. It includes the causal core, counters,
registers, sets, maps, the YATA-style sequence, and its text wrapper.
Pick individual packages when binary size or dependency count matters, or when you only need one category of CRDT. For example, if you only need counters:
gleam add lattice_countersAdd lattice_presence separately when you need distributed presence. It has no
lattice package dependencies and is not included in the lattice_crdt umbrella.
lattice_fugue and lattice_text_fugue are not published to Hex yet. To
evaluate either package, clone the lattice repository and declare the package as
a local path dependency in your project's gleam.toml:
[dependencies]lattice_fugue = { path = "../lattice/packages/lattice_fugue" }lattice_text_fugue = { path = "../lattice/packages/lattice_text_fugue" }Keep only the dependency or dependencies you need. Paths are relative to your
project's gleam.toml, so adjust them for the location of your lattice clone.
Do not use gleam add for these unreleased packages.
See Installation for full details.