[[bench]]
harness = false
name = "micro_benchmarks"

[[bench]]
harness = false
name = "integration_benchmarks"
required-features = ["bench-with-postgres"]

[[bench]]
harness = false
name = "comparison_benchmarks"
required-features = ["bench-with-tokio-postgres"]

[[bench]]
harness = false
name = "lazy_pause_resume"
required-features = ["bench-with-postgres"]

[dependencies]
base64 = "0.22"  # Base64 encoding/decoding
# Bytes manipulation
bytes = "1"
futures = "0.3"
hmac = "0.12"  # HMAC-SHA256
# Metrics for observability
metrics = "0.22"  # Metrics collection framework
pbkdf2 = "0.12"  # Key derivation for SCRAM
rand = "0.8"  # Random nonce generation
# TLS support
rustls = {version = "0.23", features = ["ring"]}
rustls-native-certs = "0.8.3"
rustls-pemfile = "2.2"
rustls-pki-types = "1"
# Serialization
serde = {version = "1", features = ["derive"]}
serde_json = "1"
# Cryptography for SCRAM authentication
sha2 = "0.10"  # HMAC-SHA256 for SCRAM
socket2 = {version = "0.6", features = ["all"]}
subtle = "2"  # Constant-time comparison for SCRAM
# Error handling
thiserror = "2"
# Async runtime
tokio = {workspace = true}
tokio-rustls = "0.26"
# Tracing
tracing = "0.1"
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
webpki-roots = "0.26"
# User info for default values
whoami = "1"
# Secure password memory management
zeroize = {version = "1.6", features = ["std", "derive"]}

[dev-dependencies]
criterion = {version = "0.5", features = ["async_tokio"]}
proptest = {workspace = true}
testcontainers = {version = "0.27", features = ["watchdog"]}
testcontainers-modules = {version = "0.15", features = ["postgres"]}
tokio-postgres = "0.7"
tokio-test = "0.4"

[[example]]
name = "basic_stream"
path = "examples/basic_stream.rs"

[features]
bench-with-postgres = []
bench-with-tokio-postgres = []

[lib]
name = "fraiseql_wire"
path = "src/lib.rs"

[lints]
workspace = true

[package]
authors = ["Lionel Hamayon <lionel@evolution-digitale.fr>"]
categories = ["database", "asynchronous"]
description = "Streaming JSON query engine for Postgres 17"
documentation = "https://docs.rs/fraiseql-wire"
edition = "2021"
homepage = "https://github.com/fraiseql/fraiseql-wire"
keywords = ["postgres", "postgresql", "json", "streaming", "async"]
license = "MIT OR Apache-2.0"
name = "fraiseql-wire"
readme = "README.md"
repository.workspace = true
rust-version.workspace = true
version.workspace = true
