graphrefly_structures/lib.rs
1//! `GraphReFly` reactive data structures.
2//!
3//! `reactiveMap`, `reactiveList`, `reactiveLog`, `reactiveIndex` —
4//! built on `imbl` persistent immutable collections so that Phase 14
5//! op-log changesets get O(log n) snapshot-and-revert naturally:
6//!
7//! - Each emit is a function `State -> State` returning a new
8//! persistent collection.
9//! - Rollback = use the prior `Arc<State>`. Glitch-free by
10//! construction.
11//! - Diff = pointer compare on `Arc::ptr_eq` is O(1); structural
12//! diff via `imbl::HashMap::diff` is O(log n).
13//!
14//! CRDT-backed variants (yrs / automerge / loro / diamond-types) are
15//! post-1.0 work, gated behind feature flags. The Rust ecosystem's
16//! CRDT libraries are the canonical implementations — yjs JS users
17//! increasingly run yrs under WASM.
18//!
19//! # Status
20//!
21//! Scaffold. Implementation lands during Milestone 5 of the Rust port,
22//! together with the user-facing Phase 14 op-log changeset API.
23//!
24//! # Module layout (planned)
25//!
26//! - `map` — reactiveMap (`imbl::HashMap-backed`)
27//! - `list` — reactiveList (`imbl::Vector-backed`)
28//! - `log` — reactiveLog (append-only op-log)
29//! - `index` — reactiveIndex (composite index over a reactiveMap)
30//! - `changeset` — Phase 14 op-log delta protocol
31
32#![warn(rust_2018_idioms, unreachable_pub)]
33#![warn(clippy::pedantic)]
34#![allow(clippy::module_name_repetitions, clippy::missing_errors_doc)]
35
36#[cfg(test)]
37mod tests {
38 #[test]
39 fn scaffold_compiles() {}
40}