[package]
name = "sentinel-driver"
version = "2.0.0"
edition = "2021"
description = "High-performance PostgreSQL wire protocol driver for Rust"
license = "MIT OR Apache-2.0"
repository = "https://github.com/cntm-labs/sentinel-driver"
homepage = "https://github.com/cntm-labs/sentinel-driver"
keywords = ["postgresql", "database", "driver", "async", "tokio"]
categories = ["database"]
readme = "README.md"
rust-version = "1.75"

[dependencies]
# Async runtime
tokio = { version = "1", features = ["net", "io-util", "time", "sync", "rt", "macros"] }

# Zero-copy buffers
bytes = "1"

# TLS
rustls = "0.23"
webpki-roots = "0.26"
tokio-rustls = "0.26"
rustls-pki-types = "1"
rustls-pemfile = "2"

# Crypto (SCRAM-SHA-256)
sha2 = "0.10"
hmac = "0.12"
stringprep = "0.1"
base64 = "0.22"
rand = "0.8"

# Common PG types
chrono = { version = "0.4", default-features = false, features = ["std"] }
uuid = "1"

# Error handling
thiserror = "2"

# Logging
tracing = "0.1"

# Async callback types (BoxFuture)
futures-core = "0.3"

# LRU cache for prepared statements
lru = "0.12"

# Derive macros
sentinel-derive = { version = "1.0.0", path = "../sentinel-derive", optional = true }

# Optional type support
rust_decimal = { version = "1", optional = true }
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
time = { version = "0.3", optional = true, features = ["std"] }

[features]
default = ["derive"]
derive = ["dep:sentinel-derive"]
with-rust-decimal = ["dep:rust_decimal"]
with-serde-json = ["dep:serde", "dep:serde_json"]
with-time = ["dep:time"]

[lints]
workspace = true

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
criterion = { version = "0.5", features = ["html_reports"] }
time = { version = "0.3", features = ["std", "macros"] }
trybuild = "1"

[[test]]
name = "core_tests"
path = "../../tests/core_tests.rs"

[[test]]
name = "postgres_tests"
path = "../../tests/postgres_tests.rs"

[[bench]]
name = "driver_bench"
harness = false
path = "../../benches/driver_bench.rs"
