logicaffeine_data/crdt/mod.rs
1//! CRDT (Conflict-free Replicated Data Types)
2//!
3//! Pure data structures for eventually consistent distributed state.
4//! CRDTs provide automatic conflict resolution - any two replicas can be
5//! merged to produce the same result regardless of order.
6//!
7//! This crate is WASM-safe: NO IO, NO SystemTime, NO network dependencies.
8//! The `Synced<T>` wrapper lives in `logicaffeine_system` (requires tokio/libp2p).
9
10mod gcounter;
11mod lww;
12mod merge;
13mod replica;
14
15// Causal infrastructure
16pub mod causal;
17
18// Delta CRDT support
19mod delta;
20mod delta_buffer;
21
22// Additional CRDTs
23mod pncounter;
24mod mvregister;
25
26// Complex CRDTs
27mod orset;
28mod ormap;
29pub mod sequence;
30
31// NOTE: sync.rs (Synced<T>) is NOT in this crate - it's in logicaffeine_system
32// because it requires tokio and networking.
33
34pub use gcounter::GCounter;
35pub use lww::LWWRegister;
36pub use merge::Merge;
37
38// Replica utilities
39pub use replica::{generate_replica_id, ReplicaId};
40
41// Causal types
42pub use causal::{Dot, DotContext, VClock};
43
44// Delta types
45pub use delta::DeltaCrdt;
46pub use delta_buffer::DeltaBuffer;
47
48// Additional CRDTs
49pub use pncounter::PNCounter;
50pub use mvregister::MVRegister;
51
52// Complex CRDTs
53pub use orset::{AddWins, ORSet, RemoveWins, SetBias};
54pub use ormap::ORMap;
55pub use sequence::{RGA, YATA};