[package]
name = "signet-cold-sql"
description = "SQL backend for signet-cold storage"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
keywords = ["sql", "storage", "cold-storage", "blockchain"]
categories = ["database-implementations"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
alloy = { workspace = true, optional = true }
alloy-primitives = { version = "1.5.6", features = ["sqlx"] }
signet-cold.workspace = true
signet-storage-types = { workspace = true, optional = true }
signet-zenith = { workspace = true, optional = true }
sqlx = { workspace = true }
thiserror.workspace = true
tokio = { workspace = true, optional = true }
tokio-stream = { workspace = true, optional = true }

[dev-dependencies]
signet-cold = { workspace = true, features = ["test-utils"] }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }

[features]
default = []
postgres = ["sqlx/postgres", "sqlx/any", "sqlx/runtime-tokio-rustls", "dep:alloy", "dep:signet-storage-types", "dep:signet-zenith", "dep:tokio", "dep:tokio-stream"]
sqlite = ["sqlx/sqlite", "sqlx/any", "sqlx/runtime-tokio-rustls", "dep:alloy", "dep:signet-storage-types", "dep:signet-zenith", "dep:tokio"]
test-utils = ["signet-cold/test-utils", "sqlite", "postgres"]
