-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCargo.toml
More file actions
61 lines (57 loc) · 2.86 KB
/
Cargo.toml
File metadata and controls
61 lines (57 loc) · 2.86 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
[workspace]
resolver = "2"
members = ["ares-core", "ares-cli", "ares-llm", "ares-tools"]
[workspace.lints.clippy]
# Functions with many parameters must use a parameter struct (see the
# `*Params` / `*Config` types throughout the workspace). Suppressing this
# with `#[allow(...)]` defeats the whole point — fix the signature instead.
too_many_arguments = "deny"
# Prefer `let ... else { ... }` over `let x = match opt { Some(x) => x, None => ... };`
# — same semantics, fewer lines, no rightward drift.
manual_let_else = "deny"
# `.iter().filter(..).collect::<Vec<_>>().len()` / `.is_empty()` / `.contains(..)` —
# allocate-then-consume when the iterator already answers the question.
needless_collect = "deny"
# `.clone()` on a value whose last use immediately follows — the move would suffice.
redundant_clone = "deny"
# Types that derive `PartialEq` should derive `Eq` too when their fields permit.
# When they don't (e.g. an `f64` or `serde_json::Value` field), suppress with
# `#[expect(clippy::derive_partial_eq_without_eq, reason = "...")]` on the type
# explaining which field blocks it.
derive_partial_eq_without_eq = "deny"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
redis = { version = "1.0", features = ["tokio-comp", "connection-manager"] }
async-nats = "0.48"
futures = "0.3"
bytes = "1"
chrono = { version = "0.4", features = ["serde"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
uuid = { version = "1.11", features = ["v4"] }
thiserror = "2"
anyhow = "1"
clap = { version = "4.5.23", features = ["derive", "env"] }
serde_yaml = "0.9"
regex = "1"
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono", "json", "uuid"] }
tera = "1"
hickory-resolver = { version = "0.26", default-features = false, features = ["tokio", "system-config"] }
# OpenTelemetry
opentelemetry = "0.31"
opentelemetry_sdk = { version = "0.31", features = ["trace"] }
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic", "http-proto", "reqwest-rustls", "trace"] }
tracing-opentelemetry = "0.32"
opentelemetry-semantic-conventions = "0.31"
# Fast deploy profile: optimized for compile speed, acceptable runtime perf.
# Use `task ec2:deploy BUILD_PROFILE=release` for production-grade optimization.
[profile.dev-deploy]
inherits = "release"
opt-level = 2 # ~40% faster compile vs opt-level=3, negligible perf difference for I/O-bound code
lto = "thin" # ~3x faster link than fat LTO, still gets cross-crate inlining
codegen-units = 16 # Max parallelism during codegen (default release=1 is slow)
debug = false # No debuginfo = smaller binary, faster link
strip = "symbols" # Strip in cargo itself (no separate strip step needed)
incremental = true # Huge win for iterative deploys (only recompile changed crates)