Skip to main content

Crate synckit_core

Crate synckit_core 

Source
Expand description

SyncKit Core - High-performance sync engine

This is the Rust core of SyncKit, compiled to both native and WASM. It implements:

  • Document structure with field-level LWW
  • Vector clocks for causality tracking
  • CRDT data structures (OR-Set, PN-Counter, Text)
  • Binary protocol encoding/decoding (when prost feature enabled)

§Examples

use synckit_core::{Document, ClientID, VectorClock};

let mut doc = Document::new("doc-123".to_string());
doc.set_field(
    "title".to_string(),
    serde_json::json!("Hello World"),
    1,
    "client-1".to_string()
);

Re-exports§

pub use awareness::Awareness;
pub use awareness::AwarenessState;
pub use awareness::AwarenessUpdate;
pub use document::Document;
pub use error::Result;
pub use error::SyncError;
pub use sync::Timestamp;
pub use sync::VectorClock;

Modules§

awareness
document
Document structure with field-level Last-Write-Wins
error
Error types for SyncKit
storage
Storage abstraction layer
sync
Synchronization primitives

Type Aliases§

ClientID
Client identifier type
DocumentID
Document identifier type
FieldPath
Field path within a document