suture-core 0.8.0

A patch-based version control system with semantic merge and format-aware drivers
Documentation

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);
}
# Ok::<(), suture_core::repository::RepoError>(())