-
Notifications
You must be signed in to change notification settings - Fork 77
/
Cargo.toml
50 lines (43 loc) · 2.03 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
[package]
name = "cursor-api"
version = "0.1.0"
edition = "2021"
authors = ["wisdgod <[email protected]>"]
[build-dependencies]
prost-build = "0.13.4"
[dependencies]
axum = { version = "0.7.9", features = ["json"] }
base64 = { version = "0.22.1", default-features = false, features = ["std"] }
bytes = "1.9.0"
chrono = { version = "0.4.39", features = ["serde"] }
dotenvy = "0.15.7"
flate2 = { version = "1.0.35", default-features = false, features = ["rust_backend"] }
futures = { version = "0.3.31", default-features = false, features = ["std"] }
hex = { version = "0.4.3", default-features = false, features = ["std"] }
prost = "0.13.4"
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"] }
regex = { version = "1.11.1", default-features = false, features = ["std", "perf"] }
reqwest = { version = "0.12.9", features = ["json", "gzip", "stream"] }
serde = { version = "1.0.216", features = ["derive"] }
serde_json = { version = "1.0.134", features = ["std"] }
sha2 = { version = "0.10.8", default-features = false }
tokio = { version = "1.42.0", features = ["rt-multi-thread", "macros", "net", "sync", "time"] }
tokio-stream = { version = "0.1.17", features = ["time"] }
tower-http = { version = "0.6.2", features = ["cors"] }
uuid = { version = "1.11.0", features = ["v4"] }
# 优化设置
[profile.release]
lto = true # 启用链接时优化
codegen-units = 1 # 减少并行编译单元以提高优化
panic = 'abort' # 在 panic 时直接终止,减小二进制大小
strip = true # 移除调试符号
opt-level = 3 # 最高优化级别
# 构建脚本设置
[package.metadata.cross.target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
[package.metadata.cross.target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
[package.metadata.cross.target.x86_64-apple-darwin]
image = "ghcr.io/cross-rs/x86_64-apple-darwin:main"
[package.metadata.cross.target.aarch64-apple-darwin]
image = "ghcr.io/cross-rs/aarch64-apple-darwin:main"