[package]
name = "cedros-sunscreen"
version = "0.1.1"
edition = "2021"
rust-version = "1.80"
description = "Sanctions screening API for blockchain addresses (OFAC, ransomware trackers)"
license = "MIT OR Apache-2.0"

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

[[bin]]
name = "cedros-sunscreen-server"
path = "src/main.rs"
required-features = ["cli"]

[features]
default = ["cli", "http"]
cli = ["dep:clap", "dep:tracing-subscriber", "dep:anyhow", "dep:dotenvy"]
http = ["dep:axum", "dep:tower-http", "dep:hyper"]

[dependencies]
chrono = { version = "0.4", features = ["serde"] }
regex = "1"
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "uuid", "chrono", "json", "migrate"] }
thiserror = "1"
tokio = { version = "1", features = ["full"] }
tracing = "0.1"

dotenvy = { version = "0.15", optional = true }
anyhow = { version = "1", optional = true }
axum = { version = "0.8", features = ["macros", "json"], optional = true }
clap = { version = "4", features = ["derive"], optional = true }
hyper = { version = "1", optional = true }
tower-http = { version = "0.6", features = ["trace", "cors"], optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"], optional = true }

[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
