[package]
name = "bsql"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
readme = "../../README.md"
description = "Safe SQL for Rust — if it compiles, the SQL is correct"

[features]
default = ["async"]
async = ["bsql-core/async", "dep:tokio"]
time = ["bsql-core/time", "bsql-macros/time"]
chrono = ["bsql-core/chrono", "bsql-macros/chrono"]
uuid = ["bsql-core/uuid", "bsql-macros/uuid"]
decimal = ["bsql-core/decimal", "bsql-macros/decimal"]
explain = ["bsql-macros/explain"]
tls = ["bsql-core/tls", "bsql-macros/tls"]
detect-n-plus-one = ["bsql-core/detect-n-plus-one"]
sqlite = ["bsql-core/sqlite", "bsql-macros/sqlite", "dep:bsql-driver-sqlite"]
## Compile SQLite from source (default for sqlite). Convenient, no system dep.
sqlite-bundled = ["sqlite", "bsql-core/sqlite-bundled", "bsql-macros/sqlite-bundled", "bsql-driver-sqlite/bundled"]
## Link against optimized system SQLite. Typically 10-15% faster for complex queries.
sqlite-system = ["sqlite", "bsql-core/sqlite-system", "bsql-macros/sqlite-system", "bsql-driver-sqlite/system"]

[dependencies]
bsql-core = { workspace = true }
bsql-macros = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "macros"], optional = true }

# SQLite (optional)
bsql-driver-sqlite = { workspace = true, optional = true }

[dev-dependencies]
trybuild = "1"
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
time = { workspace = true }
bsql-driver-postgres = { workspace = true }
uuid = { workspace = true, features = ["v4"] }
rust_decimal = { workspace = true }
