[package]
name = "bsql-driver-postgres"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
readme = "../../README.md"
description = "PostgreSQL wire protocol driver for bsql — binary protocol, arena allocation, zero-copy"

[features]
default = []
tls = ["dep:rustls", "dep:webpki-roots", "dep:tokio-rustls", "dep:rustls-pemfile"]
async = ["dep:tokio"]
detect-n-plus-one = ["dep:log"]
time = ["dep:time"]
chrono = ["dep:chrono"]
uuid = ["dep:uuid"]
decimal = ["dep:rust_decimal"]

[dependencies]
bsql-arena = { workspace = true }
rapidhash = { workspace = true }
simdutf8 = { version = "0.1", default-features = false, features = ["std"] }
smallvec = { workspace = true }

# TCP keepalive (FIX 25)
socket2 = { version = "0.5", default-features = false }
# Password zeroization (FIX 32) — already a transitive dep via crypto crates
zeroize = { version = "1", default-features = false }

# Auth
sha2 = { version = "0.10", default-features = false }
hmac = { version = "0.12", default-features = false }
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
base64 = { version = "0.22", default-features = false, features = ["alloc"] }
md-5 = { version = "0.10", default-features = false }
rand = { version = "0.9", default-features = false, features = ["std", "os_rng"] }

# TLS (optional)
rustls = { workspace = true, optional = true }
webpki-roots = { workspace = true, optional = true }
tokio-rustls = { workspace = true, optional = true }
rustls-pemfile = { workspace = true, optional = true }

# Async runtime (optional)
tokio = { workspace = true, features = ["rt", "net", "io-util", "sync"], optional = true }

# N+1 detection (optional)
log = { workspace = true, optional = true }

# Feature-gated type support (optional)
time = { workspace = true, optional = true }
chrono = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }
rust_decimal = { workspace = true, optional = true }

[dev-dependencies]
proptest = "1"
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
rcgen = { workspace = true }

