leptos-sync-core

Crates.ioleptos-sync-core
lib.rsleptos-sync-core
version0.9.0
created_at2025-09-04 03:06:20.873733+00
updated_at2025-09-21 02:31:53.094959+00
descriptionCore synchronization library for Leptos applications
homepage
repositoryhttps://github.com/cloud-shuttle/leptos-sync
max_upload_size
id1823567
size1,229,370
Peter Hanssens (petehanssens)

documentation

README

leptos-sync-core

Core synchronization library for Leptos applications, providing local-first data synchronization with advanced conflict resolution and real-time capabilities.

Features

  • CRDT Implementation: Conflict-free replicated data types (LWW, MV-Register, GCounter)
  • Advanced Conflict Resolution: Multiple strategies with custom conflict handling
  • Real-time Synchronization: Live updates with presence detection
  • Security Features: Encryption, compression, and secure key derivation
  • Storage Abstraction: Hybrid storage with automatic fallback
  • Transport Layer: WebSocket, in-memory, and hybrid transport options

Usage

use leptos_sync_core::{
    LocalFirstCollection, 
    HybridStorage, 
    HybridTransport,
    LwwRegister
};

// Create a collection with automatic sync
let storage = HybridStorage::new();
let transport = HybridTransport::new();
let collection = LocalFirstCollection::<TodoItem>::new(
    "todos".to_string(),
    storage,
    transport
);

// Use reactive queries
let todos = collection.query().watch();

Documentation

See the main project README for comprehensive documentation and examples.

License

Licensed under either of

at your option.

Commit count: 36

cargo fmt