clayers_repo/lib.rs
1//! A git-like, offline-first version control system for structural XML.
2//!
3//! Operates on content-addressed Merkle DAGs of XML Infoset nodes rather
4//! than text files. XML documents are decomposed into their constituent
5//! nodes, each content-addressed by its Exclusive C14N hash, and stored
6//! in a Merkle DAG.
7//!
8//! # Architecture
9//!
10//! - **Object model** (`object`): XML Infoset nodes + versioning objects,
11//! all content-addressed via SHA-256(ExclusiveC14N).
12//! - **Storage** (`store`): Async traits for object store and ref store,
13//! with in-memory and optional `SQLite` backends.
14//! - **Import/Export** (`import`, `export`): Bidirectional conversion
15//! between XML strings and the Merkle DAG.
16//! - **Diff** (`diff`): Structural tree diff exploiting Merkle hashes.
17//! - **Conflict** (`conflict`): Divergence elements for concurrent edits.
18//! - **Repository** (`repo`): Porcelain API composing all components.
19
20#![allow(clippy::module_name_repetitions)]
21
22pub mod diff;
23pub mod error;
24pub mod export;
25pub mod graph;
26pub mod hash;
27pub mod import;
28pub mod conflict;
29pub mod merge;
30pub mod object;
31pub mod query;
32pub mod refs;
33pub mod repo;
34pub mod store;
35pub mod sync;
36
37pub use diff::FileChange;
38pub use error::{Error, Result};
39pub use object::{
40 Attribute, Author, CommitObject, CommentObject, DocumentObject, ElementObject, Object,
41 PIObject, TagObject, TextObject, TreeEntry, TreeObject, REPO_NS,
42};
43pub use repo::Repo;
44pub use query::{QueryStore, QueryMode, QueryResult, DocumentQueryResult, NamespaceMap, resolve_revspec};
45pub use store::{ObjectStore, RefStore, Transaction};
46pub use store::memory::MemoryStore;
47pub use sync::{FastForwardOnly, Overwrite, RefConflict, Reject};
48#[cfg(feature = "sqlite")]
49pub use store::sqlite::SqliteStore;