Expand description
Suture Core — The central library for the Suture Universal Semantic Version Control System.
This crate provides:
- CAS (Content Addressable Storage): BLAKE3-indexed blob storage with Zstd compression
- Patch Algebra: Commutativity detection, merge computation, conflict handling
- Patch DAG: Directed acyclic graph of patches with branch management
- Metadata Store: SQLite-backed persistent metadata
- Repository: High-level API combining all of the above
§Example
use suture_core::repository::Repository;
// Initialize a new repository
let mut repo = Repository::init(
std::path::Path::new("my-project"),
"alice",
)?;
// Create a branch
repo.create_branch("feature", None)?;
// Stage and commit
repo.add("src/main.rs")?;
let patch_id = repo.commit("Initial commit")?;
// View log
for patch in repo.log(None)? {
println!("[{}] {}", patch.id, patch.message);
}Modules§
- cas
- Content Addressable Storage (CAS) — BLAKE3-indexed blob store with Zstd compression.
- dag
- Patch DAG — Directed Acyclic Graph of patches with branch management.
- engine
- Patch Application Engine — reconstructs file trees from patch chains.
- hooks
- Hook system for Suture — git-compatible hook execution.
- metadata
- Metadata — persistent storage and global configuration.
- patch
- Patch Algebra — the mathematical heart of Suture.
- repository
- Repository — high-level API that combines CAS, DAG, and Metadata.
- signing
- Ed25519 patch signing and verification.
Structs§
- Branch
Name - A branch name. Must be non-empty and contain only valid UTF-8.
- Hash
- A BLAKE3 content hash (32 bytes / 256 bits).
- Repo
Path - The path to a file within a Suture repository (relative to repo root).
Enums§
- Common
Error - Top-level error type for the suture-common crate.
- File
Status - Status of a file in the working set.