-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
306 lines (266 loc) · 8.75 KB
/
Cargo.toml
File metadata and controls
306 lines (266 loc) · 8.75 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
[workspace]
resolver = "2"
members = [
"crates/aletheia",
"crates/aletheia-classify",
"crates/aletheia-lexica",
"crates/aletheia-memory-mcp",
"crates/aletheia-routing",
"crates/basanos",
"crates/diaporeia",
"crates/dianoia",
"crates/eidos",
"crates/energeia",
"crates/episteme",
"crates/agora",
"crates/daemon",
"crates/eval",
"crates/hermeneus",
"crates/integration-tests",
"crates/graphe",
"crates/koina",
"crates/krites",
"crates/mneme",
"crates/melete",
"crates/nous",
"crates/organon",
"crates/pylon",
"crates/symbolon",
"crates/taxis",
"crates/thesauros",
"crates/theatron",
"crates/theatron/skene",
"crates/theatron/koilon",
"crates/poiesis/core",
"crates/poiesis/text",
"crates/poiesis/sheet",
"crates/poiesis/slides",
"crates/poiesis/lint",
"crates/poiesis/scaffold",
"crates/poiesis/typst",
"crates/poiesis/verify",
"crates/poiesis/intake",
"crates/poiesis/doc",
"crates/poiesis/diff",
"crates/poiesis/inspect",
"crates/gnosis",
"crates/aletheia-sessions-migrate",
]
# WHY: proskenion requires GTK3/webkit2gtk system libraries (via Dioxus
# desktop/webview) which are not available in CI. Excluded from workspace to
# avoid cargo-deny advisory failures on GTK deps and build failures on CI.
# Build standalone: `cargo build -p proskenion --manifest-path crates/theatron/proskenion/Cargo.toml`
exclude = [
"crates/theatron/proskenion",
]
[workspace.package]
version = "0.21.1"
edition = "2024"
license = "AGPL-3.0-or-later"
repository = "https://github.com/forkwright/aletheia"
rust-version = "1.94"
[workspace.lints.rust]
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }
rust_2018_idioms = { level = "warn", priority = -1 }
unsafe_code = "deny"
# WHY: krites loom model-check tests use `#[cfg(loom)]` gates. Register the
# cfg name so rustc doesn't warn under normal builds.
unexpected_cfgs = { level = "warn", priority = -1, check-cfg = ["cfg(loom)"] }
[workspace.lints.clippy]
pedantic = { level = "warn", priority = -1 }
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
# Deny-level
dbg_macro = "deny"
todo = "deny"
unimplemented = "deny"
exit = "deny"
# Panics in library code must be explicit and justified
unwrap_used = "deny"
expect_used = "deny"
# Correctness: holding std::sync::Mutex across .await causes deadlocks
await_holding_lock = "deny"
string_slice = "warn"
explicit_into_iter_loop = "warn"
fallible_impl_from = "warn"
fn_params_excessive_bools = "warn"
implicit_clone = "warn"
large_types_passed_by_value = "warn"
map_err_ignore = "warn"
match_wildcard_for_single_variants = "warn"
needless_for_each = "warn"
rc_mutex = "warn"
string_add = "warn"
# string_to_string removed in clippy 1.94 — covered by implicit_clone (line 54)
trait_duplication_in_bounds = "warn"
unused_self = "warn"
# Safety: numeric cast auditing (incremental)
as_conversions = "warn"
cast_possible_truncation = "warn"
indexing_slicing = "warn"
# Architectural boundary enforcement: each crate's clippy.toml lists what it
# may not call. Without these lint levels the clippy.toml entries are inert.
disallowed_methods = "deny"
disallowed_types = "deny"
[workspace.dependencies]
aletheia-lexica = { path = "crates/aletheia-lexica" }
rayon = { version = "1", default-features = false }
# Error handling
snafu = "0.8"
# Serialization
serde_json = { version = "1", default-features = false, features = ["std"] }
serde_yaml = { version = "0.9", default-features = false }
toml = "1.1"
toml_edit = "0.25"
# HTTP
http = { version = "1", default-features = false }
axum = "0.8"
utoipa = { version = "5", features = ["axum_extras"] }
reqwest = { version = "0.13", default-features = false, features = [
"rustls-no-provider",
"json",
"http2",
"query",
] }
tower = "0.5"
tower-http = { version = "0.6", default-features = false, features = [
"cors",
"compression-gzip",
"trace",
"limit",
"set-header",
"fs",
] }
# Secrets
zeroize = { version = "1", default-features = false, features = ["std"] }
# Tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
tracing-appender = { version = "0.2", default-features = false }
tracing-test = "0.2"
# Metrics
# WHY: prometheus-client is the Prometheus team's official client. It drops the
# protobuf dependency (vs. the `prometheus` crate's ~15 transitive deps) by
# using OpenMetrics text format natively. Exposition remains compatible with
# standard Prometheus scrapers — they already accept OpenMetrics text.
prometheus-client = "0.24"
# Types
compact_str = { version = "0.9", features = ["serde"] }
indexmap = { version = "2", default-features = false, features = ["serde"] }
# Time
jiff = "0.2"
# Async utilities
bytes = { version = "1", default-features = false }
# WHY: `std` feature is required for `FutureExt::catch_unwind` (used in
# melete distillation panic boundary). Stripping `std` would remove the
# unwind-safe future combinator we depend on.
futures = { version = "0.3", default-features = false, features = ["std"] }
# Encoding
base64 = "0.22"
# Async
tokio = { version = "1", default-features = false, features = [
"rt-multi-thread",
"macros",
"net",
"signal",
"sync",
"time",
"fs",
] }
tokio-stream = { version = "0.1", default-features = false }
tokio-util = { version = "0.7", default-features = false, features = ["rt"] }
# Compression
flate2 = "1"
# TLS / Security
# ring remains as transitive via rustls; direct usage replaced by RustCrypto crates
rustls = { version = "0.23", default-features = false, features = [
"ring",
"std",
"logging",
"tls12",
] }
# Cryptography (RustCrypto)
hmac = { version = "0.13", default-features = false }
sha2 = { version = "0.11", default-features = false }
aes-gcm = "0.10"
chacha20poly1305 = "0.10"
pem = "3"
# FFI / System
libc = { version = "0.2", default-features = false }
rustix = { version = "1", default-features = false, features = [
"fs",
"mm",
"thread",
] }
# File watching
notify = { version = "8", default-features = false, features = [
"macos_fsevent",
] }
# Random number generation
rand = "0.10"
# Testing
proptest = "1"
tempfile = { version = "3", default-features = false }
wiremock = { version = "0.6", default-features = false }
# WHY: loom provides permutation-testing for concurrent code under `#[cfg(loom)]`.
# Only used by the manual `unsafe impl Sync` sites in krites (#2864, #3066).
# Invoked as `RUSTFLAGS="--cfg loom" cargo test -p krites --release loom_tests`.
loom = { version = "0.7", default-features = false }
# WHY: serde, axum-server, regex, criterion declared as expanded tables at the
# end to satisfy TOML/inline-table-too-long while keeping `[workspace.dependencies]`
# block readable. Cargo resolves them identically to inline form.
[workspace.dependencies.serde]
version = "1"
default-features = false
features = ["derive", "std"]
[workspace.dependencies.axum-server]
version = "0.8"
default-features = false
features = ["tls-rustls"]
[workspace.dependencies.regex]
version = "1"
default-features = false
features = ["std", "perf", "unicode-case", "unicode-perl"]
# WHY: criterion provides statistical microbenchmarks with regression detection.
# Used in `benches/` per crate. `default-features = false` strips rayon/plotters
# (HTML reports) — we don't need plotting for CI-only runs and it cuts ~150 deps.
[workspace.dependencies.criterion]
version = "0.8"
default-features = false
features = ["cargo_bench_support"]
[profile.dev]
opt-level = 1
# WHY: 16 codegen units reduces linker pressure compared to the prior 256
# while keeping enough parallelism for fast incremental builds. On CI the
# smaller artifact set also improves cache hit rates across runs.
codegen-units = 16
# WHY: "unpacked" writes debug info to separate .dwo files instead of
# embedding it in the final binary, cutting link time on Linux by ~30%.
# On macOS this is already the default; on Windows it falls back to "packed".
split-debuginfo = "unpacked"
[profile.dev.package."*"]
opt-level = 2
# WHY: proc-macro crates are host binaries executed during compilation.
# Compiling them at opt-level 1 (vs 2) reduces cold-build time without
# measurably slowing macro expansion on this workspace, since proc-macro
# expansion time is dominated by I/O and serde parse work, not CPU-bound
# optimization.
[profile.dev.package.syn]
opt-level = 1
[profile.dev.package.proc-macro2]
opt-level = 1
[profile.dev.package.serde_derive]
opt-level = 1
[profile.dev.package.tokio-macros]
opt-level = 1
[profile.dev.package.snafu-derive]
opt-level = 1
[profile.dev.package.tracing-attributes]
opt-level = 1
[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"