Skip to main content

Crate libgrite_core

Crate libgrite_core 

Source
Expand description

Core library for Grite: event types, CRDT projections, hashing, and sled storage.

This crate defines the data model and persistence layer used by all other Grite crates. It is pure Rust with no async runtime dependency.

§Data model

  • Event — the atomic unit of change
  • EventKind — what happened (issue created, label added, etc.)
  • IssueProjection — materialized view of an issue

§Storage

  • GriteStore — sled-backed key-value store with CRUD operations
  • LockedStore — process-safe wrapper using flock

§CRDT semantics

Projections use deterministic merge rules:

  • LWW for title, body, state
  • Commutative sets for labels, assignees, dependencies
  • Append-only for comments, links, attachments

Re-exports§

pub use config::actor_dir;
pub use config::list_actors;
pub use config::load_repo_config;
pub use config::load_signing_key;
pub use config::repo_sled_path;
pub use config::save_repo_config;
pub use config::RepoConfig;
pub use error::GriteError;
pub use export::export_json;
pub use export::export_markdown;
pub use export::ExportSince;
pub use integrity::check_store_integrity;
pub use integrity::verify_event_hash;
pub use integrity::verify_store_signatures;
pub use integrity::CorruptEvent;
pub use integrity::CorruptionKind;
pub use integrity::IntegrityReport;
pub use integrity::SignatureError;
pub use lock::resource_hash;
pub use lock::Lock;
pub use lock::LockCheckResult;
pub use lock::LockPolicy;
pub use lock::LockStatus;
pub use lock::DEFAULT_LOCK_TTL_MS;
pub use signing::verify_signature;
pub use signing::SigningError;
pub use signing::SigningKeyPair;
pub use signing::VerificationPolicy;
pub use store::DbStats;
pub use store::GriteStore;
pub use store::IssueFilter;
pub use store::LockedStore;
pub use store::RebuildStats;
pub use types::actor::ActorConfig;
pub use types::context::FileContext;
pub use types::context::ProjectContext;
pub use types::context::ProjectContextEntry;
pub use types::event::DependencyType;
pub use types::event::Event;
pub use types::event::EventKind;
pub use types::event::IssueState;
pub use types::event::SymbolInfo;
pub use types::ids::generate_actor_id;
pub use types::ids::generate_issue_id;
pub use types::ids::hex_to_id;
pub use types::ids::id_to_hex;
pub use types::issue::IssueProjection;
pub use types::issue::IssueSummary;
pub use types::issue::Version;
pub use types::ActorId;
pub use types::EventId;
pub use types::IssueId;

Modules§

config
context
error
export
hash
integrity
Integrity checking for events and projections
lock
Lock types for team coordination
projection
signing
Ed25519 signing and verification for events
store
types