leptos_sync_core/
lib.rs

1//! Core synchronization library for Leptos applications
2//! 
3//! This crate provides the foundation for local-first, offline-capable data synchronization
4//! using CRDTs (Conflict-free Replicated Data Types).
5
6pub mod collection;
7pub mod crdt;
8pub mod error;
9pub mod query;
10pub mod storage;
11pub mod sync;
12pub mod transport;
13pub mod security;
14
15// Re-export main types for convenience
16pub use collection::LocalFirstCollection;
17pub use crdt::{LwwMap, LwwRegister, Mergeable, ReplicaId};
18pub use error::{CoreError, Result};
19pub use storage::{LocalStorage, StorageError};
20pub use sync::{SyncError, SyncState};
21pub use transport::{SyncTransport, TransportError};
22
23// Re-export common traits and types
24pub use serde::{Deserialize, Serialize};
25pub use async_trait::async_trait;
26
27/// Features available in this crate
28pub mod features {
29    /// Enable encryption support
30    pub const ENCRYPTION: &str = "encryption";
31    
32    /// Enable compression support
33    pub const COMPRESSION: &str = "compression";
34    
35    /// Enable metrics collection
36    pub const METRICS: &str = "metrics";
37    
38    /// Enable distributed tracing
39    pub const TRACING: &str = "tracing";
40}