[package]
name        = "cuprate-database"
version     = "0.0.0"
edition     = "2021"
description = "Cuprate's database abstraction"
license     = "MIT"
authors     = ["hinto-janai"]
repository  = "https://github.com/Cuprate/cuprate/tree/main/database"
keywords    = ["cuprate", "database"]

[features]
default   = ["heed", "service"]
# default   = ["sanakirja", "service"] # For testing `sanakirja`.
heed      = ["dep:heed"]
sanakirja = ["dep:sanakirja"]
service   = ["dep:cuprate-helper", "dep:crossbeam", "dep:tokio", "dep:tower"]

[dependencies]
cfg-if    = { workspace = true }
paste     = { workspace = true }
thiserror = { workspace = true }

# `service` feature.
cuprate-helper = { path = "../helper", features = ["thread"], optional = true }
crossbeam      = { workspace = true, features = ["std"], optional = true }
tokio          = { workspace = true, features = ["full"], optional = true }
tower          = { workspace = true, features = ["full"], optional = true }

# Optional features.
borsh     = { workspace = true, optional = true }
heed      = { git = "https://github.com/Cuprate/heed", rev = "5aa75b7", optional = true }
sanakirja = { version = "1.4.0", optional = true }
serde     = { workspace = true, optional = true }