[package]
name = "saps"
version = "0.4.1"
edition = "2024"
description = "Core library for the SAP framework"
license = "MIT"

[dependencies]
# always-on (wasm-safe; required by the errors module)
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
rmp-serde = { workspace = true }

# server-only (gated by the `server` feature)
include_dir = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
mime_guess = { workspace = true, optional = true }
rust-embed = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
sqlx = { workspace = true, optional = true }
jsonwebtoken = { workspace = true, optional = true }
chrono = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }
paste = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
cron = { workspace = true, optional = true }

# macros (server-only)
saps-db-pool-macro = { version = "0.1.1", optional = true }
saps-db-tx = { version = "0.1.1", optional = true }
saps-test-macro = { version = "0.1.2", optional = true }
saps-frontend-macro = { version = "0.1.1", optional = true }
saps-background-task = { version = "0.1.1", optional = true }

[features]
default = ["server"]
server = [
    "dep:include_dir",
    "dep:axum",
    "dep:mime_guess",
    "dep:rust-embed",
    "dep:tokio",
    "dep:sqlx",
    "dep:jsonwebtoken",
    "dep:chrono",
    "dep:uuid",
    "dep:paste",
    "dep:base64",
    "dep:tracing",
    "dep:cron",
    "dep:saps-db-pool-macro",
    "dep:saps-db-tx",
    "dep:saps-test-macro",
    "dep:saps-frontend-macro",
    "dep:saps-background-task",
]
auth-tracing = []

[dev-dependencies]
http-body-util = { workspace = true }
tokio = { workspace = true }
tower = { workspace = true }
