Skip to main content

logicaffeine_data/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! WASM-safe data structures and CRDTs
4//!
5//! This crate provides pure data structures with NO IO dependencies.
6//! It compiles for both native and wasm32-unknown-unknown targets.
7//!
8//! ## LAMPORT INVARIANT
9//!
10//! This crate has NO path to system IO. No tokio, no libp2p, no SystemTime.
11//! Timestamps are injected by callers (typically from logicaffeine_system).
12
13pub mod crdt;
14pub mod indexing;
15pub mod types;
16
17// Re-export commonly used types
18pub use crdt::{
19    generate_replica_id, AddWins, DeltaBuffer, DeltaCrdt, Dot, DotContext, GCounter, LWWRegister,
20    MVRegister, Merge, ORMap, ORSet, PNCounter, RemoveWins, ReplicaId, SetBias, VClock, RGA, YATA,
21};
22pub use types::{
23    Bool, Byte, Char, Int, LogosContains, Map, Nat, Real, Seq, Set, Text, Tuple, Unit, Value,
24};
25pub use indexing::{LogosIndex, LogosIndexMut};