[package]
name = "neocrates"
version = "0.1.33"
authors = ["hamerkillers@gmail.com"]
edition = "2024"
description = "A comprehensive Rust library for various utilities and helpers"
license = "MIT OR Apache-2.0"
repository = "https://github.com/ooiai/neocrates.git"
readme = "README.md"

[package.metadata.rust-analyzer]
cargo.features = ["full"]

[features]
default = []
logger = ["dep:tracing-subscriber"]
web = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:hyper",
    "dep:reqwest",
    "dep:url",
    "dep:urlencoding",
]
aws = [
    "awss3",
    "awssts",
    "dep:aws-config",
    "dep:aws-types",
    "dep:reqwest",
    "dep:url",
    "dep:hmac",
    "dep:sha2",
]
awss3 = [
    "dep:aws-sdk-s3",
    "dep:aws-config",
    "dep:aws-types",
]
awssts = [
    "dep:aws-sdk-sts",
    "dep:aws-config",
    "dep:aws-types",
    "dep:reqwest",
    "dep:url",
    "dep:hmac",
    "dep:sha2",
]
diesel = [
    "dep:diesel",
    "dep:deadpool",
    "dep:deadpool-diesel",
    "dep:diesel_migrations",
    "dep:url",
]
redis = [
    "dep:redis",
    "dep:bb8",
    "dep:bb8-redis",
    "dep:moka",
]
crypto = [
    "dep:argon2",
    "dep:hmac",
    "dep:ring",
    "dep:sha2",
]
sms = []
captcha=[]
auth=[]
full = ["web", "aws", "awss3", "awssts", "diesel", "redis", "crypto", "sms", "logger" ,"captcha", "auth"]

[dependencies]
# Core
tokio = { version = "1.44", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
anyhow = "1.0"
thiserror = "2.0"
chrono = { version = "0.4", features = ["serde"] }
async-trait = "0.1"
log = "0.4"
env_logger = "0.11"
once_cell = "1.21"
lazy_static = "1.5"
regex = "1"
uuid = { version = "1.18", features = ["v4", "fast-rng"] }
rand = "0.9"
rand_core = { version = "0.9", features = ["std"] }
dashmap = "6.1"
indexmap = "2"
strum = "0.27"
strum_macros = "0.27"
validator = "0.20"
bon = "3.8"
sonyflake = "0.4"

# Web
axum = { version = "0.8", features = ["macros"], optional = true }
axum-extra = { version = "0.10" , features = ["typed-header"], optional = true }
tower = { version = "0.5", features = ["full"], optional = true }
tower-http = { version = "0.6", features = ["full"], optional = true }
hyper = { version = "1.6", features = ["full"], optional = true }
reqwest = { version = "0.12", features = ["gzip", "json"], optional = true }
url = { version = "2.5.4", optional = true }
urlencoding = { version = "2.1.3", optional = true }

# Database
diesel = { version = "2", features = ["chrono", "serde_json"], optional = true }
deadpool = { version = "0.12", optional = true }
deadpool-diesel = { version = "0.6", features = ["postgres"], optional = true }
diesel_migrations = { version = "2", optional = true }

# Redis
redis = { version = "0.32", optional = true }
bb8 = { version = "0.9", optional = true }
bb8-redis = { version = "0.24", optional = true }
moka = { version = "0.12", features = ["future"], optional = true }

# AWS
aws-config = { version = "1.1.7", features = ["behavior-version-latest"], optional = true }
aws-sdk-s3 = { version = "1.83.0", optional = true }
aws-sdk-sts = { version = "1.66.0", optional = true }
aws-types = { version = "1.3.7", optional = true }

# Crypto & Utils
openssl = { version = "0.10", features = ["vendored"] }
ring = { version = "0.17.14", optional = true }
argon2 = { version = "0.5", optional = true }
hmac = { version = "0.12", optional = true }
sha2 = { version = "0.10", optional = true }
base64 = "0.22"
md5 = "0.7"
hex = "0.4"
sha1 = "0.10.6"
crockford = "1.2"
zstd = "0.13"
password-hash = { version = "0.5", features = ["rand_core", "std"] }
percent-encoding = "2.3.1"
flate2 = "1.0"
stream_throttle = "0.5"
async-stream = "0.3"
tempfile = "3"
rayon = "1.10"
image = "0.25"
imageproc = "0.25"
rust_decimal = "1.38"
snowflaker = "0.3"
prometheus = "0.14.0"
schemars = "1"
