[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://docs.ditto.live/"
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.0.1"  # SDK VERSION

[features]
default = ["timeseries", "ffi_sdk/default"]
fs-storage = ["ffi_sdk/fs-storage"]
in-memory-storage = ["ffi_sdk/in-memory-storage"]
shared-runtime-hack = []
timeseries = ["chrono"]

[dependencies]
chrono = { version = "0.4", optional = true }
crossbeam-utils = "0.8"
dotenv = "0.15.0"
ext-trait = "1.0.0"
fs_extra = "1.2"
log = "0.4.11"
rand = { version = "0.8", features = ["std_rng"] }
serde = { version = "1.0", features = ["derive"] }
serde-transcode = "1.1"
serde_bytes = "0.11.5"
serde_cbor = "0.11.1"
serde_json = "1.0.57"
to_method = "1.1.0"                                      # for ergonomic Into/TryInto conversions
tokio = { version = "1.21.2", features = ["full"] }
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"
version = "4.0.1"  # SDK VERSION

[dependencies.safer-ffi]
features = ["out-refs"]
version = "0.0.5"
# See `dittolive-ditto-sys` to know why this is commented out:
# path = "../subrepos/safer-ffi"

[dev-dependencies]
assert_matches = "1.3"
cast = "0.2.3"
chrono = { version = "0.4", features = ["serde"] }
criterion = "0.3"
env_logger = "0.8"
tempfile = "3.0"
tokio = { version = "1.21.2", features = ["full"] }
tokio-test = "0.4.1"
tracing = "0.1.30"

[dev-dependencies.safer-ffi-ditto]
features = ["out-refs"]
package = "safer-ffi"
path = "../subrepos/safer-ffi"

[[bench]]
harness = false
name = "benchmarks"
path = "benchmarking/main.rs"

# Setting `rpath` for this `rlib` is needed for the `[[examples]]` cars app
[profile.dev]
rpath = true

[profile.release]
rpath = true

[profile.bench]
rpath = true

[workspace]
members = [
    "src/utils/proc-macros",
    "dittolive-ditto-sys",
    "dittolive-ditto-sys/implicit-dittoffi-dependency-hack",
]
