first commit
This commit is contained in:
55
Cargo.toml
Normal file
55
Cargo.toml
Normal file
@@ -0,0 +1,55 @@
|
||||
[package]
|
||||
name = "web-rust-template"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
# ===== Web 框架 =====
|
||||
axum = "0.7"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tower = "0.4"
|
||||
tower-http = { version = "0.5", features = ["cors", "trace"] }
|
||||
|
||||
# ===== 数据库(支持 MySQL、SQLite、PostgreSQL) =====
|
||||
# SeaORM - 数据库 ORM(替代 SQLX 直接使用)
|
||||
sea-orm = { version = "1.1", features = [
|
||||
"runtime-tokio-rustls",
|
||||
"sqlx-mysql",
|
||||
"sqlx-sqlite",
|
||||
"sqlx-postgres",
|
||||
"macros",
|
||||
"with-chrono",
|
||||
"with-uuid",
|
||||
] }
|
||||
# ===== 序列化 =====
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
# ===== 认证与加密 =====
|
||||
jsonwebtoken = "9"
|
||||
argon2 = "0.5"
|
||||
sha2 = "0.10"
|
||||
base64 = "0.22"
|
||||
|
||||
# ===== Redis =====
|
||||
redis = { version = "0.27", features = ["tokio-comp", "connection-manager"] }
|
||||
|
||||
# ===== 工具库 =====
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
anyhow = "1"
|
||||
thiserror = "1"
|
||||
async-trait = "0.1"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
config = "0.13"
|
||||
rand = "0.8"
|
||||
clap = { version = "4", features = ["derive", "env"] }
|
||||
|
||||
# 优化发布版本
|
||||
[profile.release]
|
||||
opt-level = "z"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
panic = "abort"
|
||||
Reference in New Issue
Block a user