-
Notifications
You must be signed in to change notification settings - Fork 5
/
Cargo.toml
69 lines (64 loc) · 2.13 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
[package]
name = "rupa"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = { version = "0.7.1", features = ["multipart"] } # multipart 用于文件上传
bcrypt = "0.15.0"
chrono = "0.4.31"
colored = "2.0.4"
encoding_rs = "0.8.33"
include_dir = "0.7.3"
jsonwebtoken = "9.2.0"
mime_guess = "2.0.4"
rand = "0.8.5"
regex = "1.10.2"
rust-embed = "8.0.0"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.108"
sha1 = "0.10.6"
tokio = { version = "1.34.0", features = ["rt-multi-thread", "full", "macros"] }
ureq = { version = "2.1.3", features = ["json"] }
sea-orm = { version = "^0.12.7", features = [
"sqlx-sqlite", # 此处支持postgres,mysql,sqlite等
"runtime-tokio-rustls", # 不加则提示error: either the `runtime-async-std` or `runtime-tokio` feature must be enabled
"macros",
] }
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
log = "0.4.20"
sea-orm-macros = "0.12.6"
sea-orm-migration = "0.12.6"
crypto = "0.5.1"
base64 = "0.21.5"
typenum = "1.17.0"
http-body-util = "0.1.0"
tower = { version = "0.4.13", features = ["util", "timeout"] }
tower-http = { version = "0.5.0", features = [
"fs",
"limit",
"trace",
"cors",
"timeout",
] } # 文件上传时用到
lazy_static = "1.4.0"
safe_cache = "0.2.2"
math_captcha = "0.1.1"
serde_default = { git = "https://github.com/ctaoist/serde_default" } # 解决serde无法设置默认值的问题
pulldown-cmark = "0.9.3"
ulid = "1.1.0"
sysinfo = "0.30.3"
[lints.rust]
#unsafe_code = "forbid"
warnings = "allow" # deny, warn, allow, or forbid
[profile.dev]
debug = false
# 这部分优化,可以大幅缩减安装包体积
[profile.release]
opt-level = "z" # 访问量极小,体积优先
lto = true # 启用 Link Time Optimization
codegen-units = 1 # 控制编译单元的数量,这里设置为 1 可以减小体积
debug = false # 关闭调试信息
panic = "abort" # 在发生 panic 时立即终止程序,减小体积
strip = "symbols" # 或者 "symbols" # 不加时489kb,debuginfo时442kb;symbols时只有362kb;symbols等价于strip