-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
83 lines (64 loc) · 2.46 KB
/
Copy pathCargo.toml
File metadata and controls
83 lines (64 loc) · 2.46 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
[package]
name = "trend-monitor"
version = "0.1.0"
edition = "2024"
[dependencies]
# Web framework
axum = { version = "0.8", features = ["macros"] }
axum-extra = { version = "0.12.6", features = ["typed-header"] }
tower = { version = "0.5", features = ["limit"] }
tower-http = { version = "0.7.0", features = ["cors", "trace"] }
tokio = { version = "1", features = ["full"] }
# Database
sqlx = { version = "0.7", features = ["runtime-tokio", "sqlite", "chrono", "migrate"] }
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.9.8"
# Time
chrono = { version = "0.4", features = ["serde"] }
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] }
tracing-appender = "0.2"
# RSS parsing (used in step 05, declared early)
feed-rs = "2.3.1"
# String matching (used in step 05, declared early)
aho-corasick = "1"
# HTTP client (webhook push, used in step 05)
reqwest = { version = "0.13.4", features = ["json"] }
# Random token generation
rand = "0.10.1"
hex = "0.4"
# Cancellation token for graceful shutdown
tokio-util = "0.7"
# SHA-256 for token hashing
sha2 = "0.11.0"
# Concurrent stream processing
futures = "0.3.32"
# Async trait (extensible parser)
async-trait = "0.1.89"
# Email sending (SMTP)
lettre = { version = "0.11", features = ["tokio1-native-tls", "builder"] }
# Input validation
validator = { version = "0.20.0", features = ["derive"] }
# ─── Dev-dependencies (integration tests) ───
[dev-dependencies]
chrono = { version = "0.4", features = ["serde"] }
# ─── Profile: Release (production build) ───
[profile.release]
opt-level = 3 # Maximum optimization
lto = "fat" # Full Link-Time Optimization across crates
codegen-units = 1 # Single codegen unit for better optimization (slower compile, faster binary)
strip = "symbols" # Strip debug symbols to reduce binary size
panic = "abort" # Abort on panic (smaller binary, no unwinding overhead)
incremental = false # Disable incremental compilation for best optimization
overflow-checks = false # Disable integer overflow checks in release
# ─── Profile: Dev (fast iteration) ───
[profile.dev]
opt-level = 0 # No optimization for fast compile
incremental = true # Enable incremental compilation
# ─── Profile: Dev-opt (optimized debug) ───
[profile.dev-opt]
inherits = "dev"
opt-level = 2 # Optimize for performance while keeping debug info