[package]
name = "sqlpage"
version = "0.44.1"
edition = "2024"
description = "Build data user interfaces entirely in SQL. A web server that takes .sql files and formats the query result using pre-made configurable professional-looking components."
keywords = ["web", "sql", "framework"]
license = "MIT"
homepage = "https://sql-page.com/"
repository = "https://github.com/sqlpage/SQLPage"
documentation = "https://docs.rs/sqlpage"
include = ["/src", "/README.md", "/build.rs", "/sqlpage"]

[profile.superoptimized]
inherits = "release"
strip = "debuginfo"
lto = "fat"
panic = "abort"
codegen-units = 2

[dependencies]
sqlx = { package = "sqlx-oldapi", version = "0.6.56", default-features = false, features = [
    "any",
    "runtime-tokio-rustls",
    "migrate",
    "sqlite",
    "postgres",
    "mysql",
    "mssql",
    "odbc",
    "chrono",
    "bigdecimal",
    "json",
    "uuid",
] }
chrono = "0.4.23"
actix-web = { version = "4", features = ["rustls-0_23", "cookies"] }
percent-encoding = "2.2.0"
handlebars = "6.2.0"
log = "0.4.17"
mime_guess = "2.0.4"
futures-util = "0.3.21"
tokio = { version = "1.24.1", features = ["macros", "rt", "process", "sync"] }
tokio-stream = "0.1.9"
anyhow = "1"
serde = "1"
serde_json = { version = "1.0.82", features = [
    "preserve_order",
    "raw_value",
    "arbitrary_precision",
] }
lambda-web = { version = "0.2.1", features = ["actix4"], optional = true }
sqlparser = { version = "0.62.0", default-features = false, features = [
    "std",
    "visitor",
] }
async-stream = "0.3"
async-trait = "0.1.61"
async-recursion = "1.0.0"
bigdecimal = { version = "0.4.8", features = ["serde-json"] }
include_dir = "0.7.2"
config = { version = "0.15.4", features = ["json"] }
markdown = { version = "1", features = ["log"] }
argon2 = "0.5.3"
actix-web-httpauth = "0.8.0"
rand = "0.10.0"
actix-multipart = "0.8.0"
base64 = "0.22"
hmac = "0.13"
sha2 = "0.11"
rustls-acme = "0.15"
dotenvy = "0.15.7"
csv-async = { version = "1.2.6", features = ["tokio"] }
rustls = { version = "0.23" } # keep in sync with actix-web, awc, rustls-acme, and sqlx
rustls-native-certs = "0.8.1"
awc = { version = "3", features = ["rustls-0_23-webpki-roots"] }
clap = { version = "4.5.17", features = ["derive"] }
tokio-util = "0.7.12"
openidconnect = { version = "4.0.0", default-features = false, features = ["accept-rfc3339-timestamps"] }
encoding_rs = "0.8.35"
odbc-sys = { version = "0", optional = true }
regex = "1"

# OpenTelemetry / tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["registry", "env-filter"] }
tracing-opentelemetry = { version = "0.33", default-features = false }
tracing-actix-web = { version = "0.7", default-features = false }
tracing-log = "0.2"
opentelemetry = { version = "0.32", default-features = false, features = ["trace", "metrics"] }
opentelemetry_sdk = { version = "0.32", default-features = false, features = ["metrics", "rt-tokio", "spec_unstable_metrics_views", "experimental_trace_batch_span_processor_with_async_runtime", "experimental_metrics_periodicreader_with_async_runtime"] }
opentelemetry-otlp = { version = "0.32", default-features = false, features = ["http-proto", "metrics"] }
opentelemetry-http = { version = "0.32", default-features = false }
opentelemetry-semantic-conventions = { version = "0.32", features = ["semconv_experimental"] }


[features]
default = []
odbc-static = ["odbc-sys", "odbc-sys/vendored-unix-odbc"]
lambda-web = ["dep:lambda-web", "odbc-static"]

[dev-dependencies]
actix-http = "3"
tokio = { version = "1", features = ["rt", "time", "test-util"] }

[build-dependencies]
awc = { version = "3", features = ["rustls-0_23-webpki-roots"] }
rustls = "0.23"
actix-rt = "2.8"
libflate = "2"
futures-util = "0.3.21"
