[package]
name = "trailbase"
version = "0.2.0"
edition = "2024"
license = "OSL-3.0"
rust-version = "1.93"
description = "Package to use TrailBase as a framework"
homepage = "https://trailbase.io"
repository = "https://github.com/trailbaseio/trailbase"
readme = "../../README.md"
exclude = [
  "benches/",
  "tests/",
  "**/node_modules/",
  "**/dist/",
]
autobenches = false

[lib]
doctest = false

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

[features]
default = []
otel = ["dep:axum-tracing-opentelemetry", "dep:init-tracing-opentelemetry"]
geos = ["dep:litegis", "dep:geos"]
geos-static = ["litegis/static", "dep:geos"]
wasm = ["dep:trailbase-wasm-runtime-host"]
# Enable axum's "ws" feature: https://doc.rust-lang.org/cargo/reference/features.html#dependency-features
ws = ["axum/ws"]

[dependencies]
aes-gcm-siv = "0.11.1"
argon2 = { version = "^0.5.3", default-features = false, features = ["alloc", "password-hash"] }
askama = { workspace = true }
async-channel = "2.3.1"
async-trait = "0.1.80"
axum = { workspace = true }
axum-tracing-opentelemetry = { version = "0.33.0", optional = true }
base32 = "0.5.1"
base64 = { workspace = true }
bytes = { version = "1.8.0", features = ["serde"] }
chrono = "^0.4.38"
client-ip = "0.2.1"
const_format = "0.2.35"
cron = "0.16.0"
ed25519-dalek = { version = "2.1.1", features = ["pkcs8", "pem", "rand_core"] }
fallible-iterator = "0.3.0"
flume = { workspace = true }
form_urlencoded = "1.2.1"
futures-util = { workspace = true }
geos = { version = "11.0.0", default-features = false, features = ["geo", "json"], optional = true }
http-body-util = "0.1.3"
hyper = "1.6.0"
hyper-util = "0.1.7"
indexmap = "2.11.4"
init-tracing-opentelemetry = { version = "0.37.0", features = ["tracing_subscriber_ext", "metrics"], optional = true }
itertools = "0.14.0"
jsonschema = { version = "0.46.0", default-features = false }
jsonwebtoken = { version = "^10.2.0", default-features = false, features = ["use_pem", "rust_crypto"] }
lazy_static = "1.4.0"
lettre = { version = "^0.11.7", default-features = false, features = ["tokio1-rustls-tls", "sendmail-transport", "smtp-transport", "builder"] }
litegis = { workspace = true, optional = true }
log = { version = "^0.4.21", default-features = false }
mini-moka = "0.10.3"
minijinja = { workspace = true }
oauth2 = { version = "5.0.0-alpha.4", default-features = false, features = ["rustls-tls"] }
object_store = { version = "0.13.0", default-features = false, features = ["aws", "fs"] }
parking_lot = { workspace = true }
pin-project-lite = "0.2.16"
prost = { version = "^0.14.1", default-features = false }
prost-reflect = { version = "^0.16.0", default-features = false, features = ["derive", "text-format"] }
quick_cache = "0.6.18"
rand = { workspace = true }
regex = "1.11.0"
reqwest = { workspace = true }
rusqlite = { workspace = true }
rust-embed = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde_path_to_error = "0.1.16"
serde_qs = { workspace = true }
serde_repr = "0.1.20"
serde_urlencoded = "0.7.1"
sha2 = "0.11.0"
sqlformat = "0.5.0"
sqlite3-parser = { workspace = true }
thiserror = "2.0.12"
tokio = { workspace = true }
tokio-rustls = { workspace = true }
totp-rs = { version = "5.7.0", features = ["gen_secret", "qr", "otpauth"] }
tower = "0.5.0"
tower-cookies = "0.11.0"
tower-http = { version = "^0.6.0", default-features = false, features = ["cors", "trace", "fs", "limit"] }
tower-service = { version = "0.3.3", default-features = false }
tower_governor = { version = "0.8.0", default-features = false, features = ["axum"] }
tracing = { workspace = true }
tracing-opentelemetry-instrumentation-sdk = "0.32.0"
tracing-subscriber = { workspace = true }
trailbase-assets = { workspace = true }
trailbase-build = { workspace = true }
trailbase-extension = { workspace = true }
trailbase-qs = { workspace = true }
trailbase-reactive = { workspace = true }
trailbase-refinery = { workspace = true }
trailbase-schema = { workspace = true }
trailbase-sqlite = { workspace = true }
trailbase-sqlvalue = { workspace = true, features = ["rusqlite"] }
trailbase-wasm-common = { workspace = true }
trailbase-wasm-runtime-host = { workspace = true, optional = true }
ts-rs = { workspace = true }
url = { version = "^2.4.1", default-features = false }
utoipa = { version = "5.0.0-beta.0", features = ["axum_extras"] }
uuid = { workspace = true }
validator = { version = "0.20.0", default-features = false }
walkdir = "2.5.0"

[build-dependencies]
trailbase-build = { workspace = true }

[dev-dependencies]
anyhow = "^1.0.86"
axum-test = "20.0.0"
criterion = { version = "0.8", features = ["html_reports", "async_tokio"] }
env_logger = { workspace = true }
indoc = "2.0.5"
quoted_printable = "0.5.1"
rcgen = "0.14.1"
schemars = "1.0.0"
temp-dir = "0.2.0"
tower = { version = "0.5.0", features = ["util"] }
trailbase-extension = { workspace = true }
