Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
180 lines (166 loc) · 6.31 KB
/
Copy pathCargo.toml
File metadata and controls
180 lines (166 loc) · 6.31 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
[workspace]
resolver = "3"
members = [
"crates/walgit-proto",
"crates/walgit-store",
"crates/walgit-config",
"crates/walgit-git",
"crates/walgit-wal",
"crates/walgit-server",
"crates/walgit-cli",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
license = "MIT"
rust-version = "1.90"
# The lint gate: `just clippy` runs `cargo clippy --workspace --all-targets -- -D warnings`
# against this table (every crate opts in with `[lints] workspace = true`). Test code is
# exempt from the panic-path restriction lints via clippy.toml (allow-unwrap-in-tests etc.).
[workspace.lints.rust]
# The two statvfs call sites must carry an explicit #[allow(unsafe_code)] — new unsafe
# should be a reviewed decision, not a habit.
unsafe_code = "warn"
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
# Panic paths in production code. A panic here is a 500 (CatchPanicLayer) at best and an
# aborted push at worst; recoverable failures must travel as Results. Known-infallible
# cases (constant HeaderValue parses, checked-then-unwrap invariants) should say so with
# a targeted #[allow] or an expect() naming the invariant.
unwrap_used = "warn"
expect_used = "warn"
panic = "warn"
indexing_slicing = "warn"
string_slice = "warn"
unchecked_time_subtraction = "warn"
# Debugging leftovers must not reach main.
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
# Unsafe hygiene: every unsafe block carries a // SAFETY: comment and does one thing.
undocumented_unsafe_blocks = "deny"
multiple_unsafe_ops_per_block = "warn"
# Holding a sync lock across .await stalls the whole worker thread.
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
# Pedantic members that are documentation/naming style, not safety — pure noise here.
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
similar_names = "allow"
too_many_lines = "allow"
[workspace.dependencies]
walgit-proto = { path = "crates/walgit-proto" }
walgit-store = { path = "crates/walgit-store" }
walgit-config = { path = "crates/walgit-config" }
walgit-git = { path = "crates/walgit-git" }
walgit-wal = { path = "crates/walgit-wal" }
walgit-server = { path = "crates/walgit-server" }
anyhow = "1"
thiserror = "2"
async-trait = "0.1"
bytes = "1"
futures = "0.3"
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", features = ["io", "codec"] }
tokio-stream = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.9"
rust-embed = "8"
prost = "0.14"
prost-types = "0.14"
prost-build = "0.14"
tonic = "0.14"
axum = { version = "0.8", features = ["http2", "macros"] }
hyper = { version = "1", features = ["full"] }
hyper-util = { version = "0.1", features = ["full"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["trace", "compression-gzip", "compression-br", "decompression-gzip", "timeout", "limit", "catch-panic", "set-header"] }
http = "1"
http-body = "1"
http-body-util = "0.1"
gix = { version = "0.86", default-features = false, features = ["sha1", "sha256", "max-performance-safe", "blocking-network-client", "parallel", "revision", "interrupt", "worktree-mutation", "index"] }
gix-pack = { version = "0.73", features = ["streaming-input", "object-cache-dynamic", "generate"] }
gix-hash = { version = "0.26", features = ["sha1", "sha256"] }
gix-object = "0.63"
gix-features = { version = "0.49", features = ["parallel", "walkdir", "progress"] }
gix-packetline = { version = "0.22", features = ["blocking-io"] }
gix-packetline-blocking = "0.22"
gix-protocol = { version = "0.64", features = ["blocking-client"] }
gix-transport = { version = "0.58", features = ["blocking-client"] }
gix-ref = "0.66"
gix-odb = "0.83"
gix-traverse = "0.60"
gix-revwalk = "0.34"
gix-negotiate = "0.34"
gix-commitgraph = "0.38"
gix-tempfile = "24"
gix-lock = "24"
gix-date = "0.15"
gix-actor = "0.41"
gix-hashtable = "0.16"
gix-validate = "0.11"
google-cloud-storage = "1"
google-cloud-gax = "1"
google-cloud-auth = "1"
aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1"
aws-smithy-types = "1"
clap = { version = "4", features = ["derive", "env"] }
rand = "0.9"
sha1 = "0.10"
sha2 = "0.10"
hmac = "0.12"
hex = "0.4"
humantime = "2"
humantime-serde = "1"
bytesize = { version = "2", features = ["serde"] }
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4"] }
dashmap = "6"
parking_lot = "0.12"
moka = { version = "0.12", features = ["sync"] }
mimalloc = "0.1"
tempfile = "3"
flate2 = "1"
async-compression = { version = "0.4", features = ["tokio", "gzip"] }
pin-project-lite = "0.2"
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream", "json"] }
base64 = "0.22"
jsonwebtoken = { version = "11.0.0", features = ["rust_crypto"] }
libc = "0.2"
metrics = "0.24"
metrics-exporter-prometheus = { version = "0.17", default-features = false, features = ["http-listener"] }
# TLS (in-process termination)
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
rustls-pemfile = "2"
tokio-rustls = { version = "0.26", default-features = false, features = ["tls12", "logging", "ring"] }
rcgen = { version = "0.14", default-features = false, features = ["ring", "pem"] }
[profile.release]
# thin LTO + a few codegen units: near-fat performance, much faster rebuilds
lto = "thin"
codegen-units = 8
opt-level = 3
debug = 1
# unwind: a panic in one request task must not take down an instance serving
# many concurrent git operations (tokio isolates task panics; CatchPanicLayer -> 500).
panic = "unwind"
[profile.dev]
# Full debuginfo on this graph (gix, aws-sdk, prost, axum, …) makes every
# cold `cargo test` in a worktree spend minutes in LLVM + linking. Line tables
# keep usable panic backtraces; `CARGO_PROFILE_DEV_DEBUG=2` restores full info.
debug = "line-tables-only"
# Deps stay optimized so gix/git-heavy tests stay fast; workspace crates stay
# opt-level 0 (the default) so our own edit-compile cycle is cheap.
[profile.dev.package."*"]
opt-level = 2
debug = "line-tables-only"
# `package."*"` would otherwise opt-2 proc-macros and build.rs too — the
# usual compile-time footgun, with no test-runtime payoff.
[profile.dev.build-override]
opt-level = 0
debug = 0