magic_sync 0.1.1

Keeps partial copies of PostgreSQL tables on SQLite replicas — offline-first, by comparing what each replica holds with what it should hold
Documentation
[package]
name = "magic_sync"
description = "Keeps partial copies of PostgreSQL tables on SQLite replicas — offline-first, by comparing what each replica holds with what it should hold"
keywords = ["sync", "replication", "offline-first", "postgres", "sqlite"]
categories = ["database"]
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
readme = "../README.md"
homepage = "https://rsansores.github.io/magic_sync/"
documentation = "https://docs.rs/magic_sync"

[features]
# One backend per build: the server plans and sends on postgres, a replica
# applies on sqlite.
postgres = ["sqlx/postgres", "dep:hmac", "dep:rand", "dep:sha2"]
sqlite = ["sqlx/sqlite"]

[dependencies]
chrono = { version = "0.4", default-features = false, features = ["clock", "serde", "std"] }
hmac = { version = "0.12", optional = true }
magic_sync_derive = { version = "=0.1.1", path = "../magic_sync_derive" }
prost = "0.14"
rand = { version = "0.8", optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = { version = "0.10", optional = true }
sqlx = { version = "0.8", default-features = false, features = ["runtime-tokio", "derive", "chrono", "uuid", "json"] }
thiserror = "2"
tokio = { version = "1", features = ["macros", "rt", "sync", "time"] }
tracing = "0.1"
uuid = { version = "1", features = ["serde", "v7"] }

[package.metadata.docs.rs]
features = ["postgres"]

[dev-dependencies]
# `#[sqlx::test]`, which builds a database of its own for each test.
sqlx = { version = "0.8", default-features = false, features = ["macros", "migrate"] }
prost-build = "0.14"
protox = "0.9"
trybuild = "1"
ts-rs = { version = "12", features = ["chrono-impl", "uuid-impl", "serde-compat", "no-serde-warnings"] }