[package]
authors = ["Ditto Engineering Team <engineering@ditto.live>"]
categories = ["database-implementations", "external-ffi-bindings", "database"]
description = "Ditto is a peer to peer cross-platform database that allows mobile, web, IoT and server apps to sync with or without an internet connection."
documentation = "https://ditto.com/link/docs"
edition = "2021"
homepage = "https://www.ditto.live"
keywords = ["sdk", "distributed", "peer-to-peer", "database", "bluetooth"]
license-file = "LICENSE.md"
name = "dittolive-ditto"
publish = true
resolver = "2"

version = "4.12.6-preview-1"  # SDK VERSION
rust-version = "1.85"                                                                                                                                        # MSRV

[lib]
path = "src/lib.rs"

# Note: you'll probably need to update `internal/Cargo.toml` as well.
[features]
default = ["timeseries", "ffi_sdk/default"]
fs-storage = ["ffi_sdk/fs-storage"]
in-memory-storage = ["ffi_sdk/in-memory-storage"]
timeseries = ["chrono"]
experimental = []
experimental-bus = [
	"experimental",
	"dittolive-ditto-base",
	"dittolive-ditto-base/experimental-bus",
	"ffi_sdk/experimental-bus",
]

# Note: you'll probably need to update `internal/Cargo.toml` as well.
[dependencies]
async-trait = "0.1.88"
async_fn_traits = "0.1.1"
base64 = "0.22.1"
bytemuck = { version = "1.16.3", features = ["derive"] }
bytes = "1.7"
chrono = { version = "0.4.38", optional = true, features = ["now"] }
dashmap = "6.1"
dotenvy = "0.15.7"
ext-trait = "1.0.0"
extern-c = "0.1.0"
fs_extra = "1.2"
hashbrown = "0.14.3"
macro_rules_attribute = "0.1.3"
never-say-never = "6.6.666"
rand = { version = "0.8", features = ["std_rng"] }
serde = { version = "1.0", features = ["derive"] }
serde-transcode = "1.1"
serde_bytes = "0.11.15"
serde_cbor.workspace = true
serde_json.workspace = true
serde_with = { version = "3.2", features = ["base64", "chrono_0_4"] }
thiserror = "2.0.9"
to_method = "1.1.0"                                                  # for ergonomic Into/TryInto conversions
tokio = { version = "1.21.2", features = ["full"] }
tracing = "0.1.40"
url = { version = "2.5.4", features = ["serde"] }
uuid = { version = "1.1.2", features = ["serde", "v4"] }

[dependencies.ffi_sdk]
default-features = false                 # Inherit default features from this package's
package = "dittolive-ditto-sys"
path = "../dittolive-ditto-sys/external"
version = "=4.12.6-preview-1"  # SDK VERSION

[dependencies.safer-ffi]
features = ["tokio"]
version = "0.2.0-alpha.0"   # safer-ffi version

[dependencies.dittolive-ditto-base]
version = "=4.12.6-preview-1"  # SDK VERSION
default-features = false
optional = true
path = "../dittolive-ditto-base"

# Note: you'll probably need to update `internal/Cargo.toml` as well.
[dev-dependencies]
anyhow = "1.0.95"
assert_matches = "1.3"
axum = "0.7.5"
bpaf = { version = "0.9", features = ["derive"] }
bytesize = "1.2.0"
cast = "0.2.3"
chrono = { version = "0.4.24", features = ["serde"] }
criterion = { version = "0.5.1", features = ["async_tokio"] }
crossterm = "0.26.1"
dioxus = { version = "0.5.1", features = ["liveview"] }
dioxus-liveview = { version = "0.5.1", features = ["axum"] }
flate2 = "1.0.30"
culpa = "1.0.0"
futures = "0.3"
flume = "0.11.0"
humantime = "2.1.0"
once_cell = "1.19.0"
proptest = "1.4.0"
rand = "0.8.5"
ratatui = "0.22.0"
shlex = "1.3.0"
static_assertions = "1.1"
tempfile = "3.20.0"
tokio = { version = "1.21.2", features = ["full"] }
tokio-test = "0.4.1"
tracing-subscriber = { version = "0.3.18", features = ["tracing-log"] }
walkdir = "2"

[[test]]
name = "bus"
required-features = ["experimental-bus"]

[[example]]
name = "bus"
required-features = ["experimental-bus"]

[[example]]
name = "bus_ping"
required-features = ["experimental-bus"]

[[example]]
name = "bus_pong"
required-features = ["experimental-bus"]

[[bench]]
name = "bus"
required-features = ["experimental-bus"]
harness = false
