Files
phthonus/frameworks/Rust/axum/Cargo.toml
2025-03-26 13:54:32 +08:00

46 lines
1.8 KiB
TOML

cargo-features = ["profile-rustflags", "trim-paths"]
[package]
name = "phthonus"
version = "0.1.0"
edition = "2021"
[dependencies]
# server
axum = "0.8.1"
axum-extra = { version = "0.10.0", features = ["typed-header"] }
tokio = { version = "1.44.1", features = ["full"] }
tower = "0.5.2"
tower-http = { version = "0.6.2", features = ["full"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
# error
anyhow = "1.0.97"
thiserror = "2.0.12"
# tools
dotenvy = "0.15.7"
regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive", "serde_derive"] }
serde_json = { version = "1.0.140" }
serde_repr = "0.1.20"
chrono = "0.4.40"
argon2 = "0.5.3"
# password
fastrand = "2.3.0"
rand = "0.9.0"
validator = { version = "0.20.0", features = ["derive"] }
jsonwebtoken = "9.3.1"
[profile.dev]
incremental = true # Compile your binary in smaller steps.
rustflags = ["-Zthreads=8"] # Better compile performance.
[profile.release]
codegen-units = 1 # Allows LLVM to perform better optimization.
lto = true # Enables link-time-optimizations.
opt-level = 3 # Prioritizes small binary size. Use `3` if you prefer speed.
panic = "abort" # Higher performance by disabling panic handlers.
strip = true # Ensures debug symbols are removed.
trim-paths = "all" # Removes potentially privileged information from your binaries.
rustflags = ["-Cdebuginfo=0", "-C", "target-cpu=native", "-Z", "threads=8"]