Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
92 lines (82 loc) · 2.91 KB
/
Copy pathCargo.toml
File metadata and controls
92 lines (82 loc) · 2.91 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[workspace]
members = ["crates/pace-forge-config"]
# Lint baseline for the whole workspace (#58). Anything not listed here keeps
# the default setting; `missing_docs` and the pedantic set are deliberately not
# enabled yet, because CI runs clippy with `-D warnings` and enabling them
# means cleaning up ~2400 findings in the same change.
[workspace.lints.rust]
unsafe_code = "forbid"
unsafe_op_in_unsafe_fn = "deny"
# Suppressions must stay observable: `expect` complains once its reason goes stale.
[workspace.lints.clippy]
allow_attributes = "deny"
multiple_unsafe_ops_per_block = "deny"
undocumented_unsafe_blocks = "deny"
# Panicking in production code is a defect: the CLI has no catch_unwind net,
# so an unwrap aborts the whole run with a raw panic (#61).
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
allow_attributes_without_reason = "deny"
[lints]
workspace = true
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
toml = "1.1.4"
[package]
name = "pace-forge"
version = "0.1.11"
edition = "2024"
# 依赖链把 icu_* 钉在 1.88(idna → url → ureq),低于这个版本直接编译不过。
rust-version = "1.88"
description = "运动世界校园 自动刷跑客户端 · 纯 Rust,极验本地求解,数据自洽"
license = "MIT"
repository = "https://github.com/IRmsk/pace-forge"
[lib]
name = "pace_forge"
crate-type = ["rlib"]
[features]
default = ["cli"]
cli = []
gui = ["dep:eframe", "dep:egui"]
[[bin]]
name = "pace-forge"
[dependencies]
# --- 配置层 ---
pace-forge-config = { path = "crates/pace-forge-config" }
# --- 错误层 ---
thiserror = "2"
# --- 协议层 ---
serde.workspace = true
serde_json.workspace = true
tiny_http = "0.12"
ureq = { version = "2", default-features = false, features = ["json", "tls", "gzip", "native-certs"] }
# 加密
aes = "0.8"
cbc = { version = "0.1", features = ["alloc", "block-padding"] }
rsa = { version = "0.9", features = ["sha2"] }
# md-5 / sha1 为协议强制(厂商报文签名/摘要口径),非安全用途;
# 安全哈希走 sha2。审计时勿将这两个依赖误判为安全弱点。
md-5 = "0.10"
sha1 = "0.11"
sha2 = "0.11"
# 极验缺口识别(只编 PNG,避免拖入整套图片编解码)
image = { version = "0.25", default-features = false, features = ["png"] }
base64 = "0.22"
# PACE_EXTRA_CA 追加信任根时,仍要带上公共 CA 根(ureq 默认就是这套)
webpki-roots = "0.26"
# OBS 明细要 gzip+base64
flate2 = "1"
rand = "0.9"
# GUI(可选,默认不编译)
eframe = { version = "0.29", optional = true }
egui = { version = "0.29", optional = true }
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
# 不用 panic = "abort":Web 是长期驻留进程,一个请求里漏掉的 panic 不该
# 把整个进程连同正在跑的批次一起带走。配下面的 catch_unwind 把它隔离在单个请求内。
panic = "unwind"