Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
71 lines (62 loc) · 2.12 KB
/
Copy pathCargo.toml
File metadata and controls
71 lines (62 loc) · 2.12 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
[workspace]
resolver = "3"
members = [
"crates/api",
"crates/billing",
"crates/content",
"crates/loginwith",
"crates/migrate",
"crates/prices",
"crates/subscriber",
"crates/ohara",
]
# Declared once here and inherited by every crate, so a new crate cannot opt
# out by forgetting to repeat them.
[workspace.lints.rust]
unsafe_code = "forbid"
missing_debug_implementations = "warn"
unreachable_pub = "warn"
[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
# No panics. This is a long-running server: a panic in a request handler takes
# a thread down, and with panic=abort in release it takes the process — and
# therefore, in a single container, the whole site — with it.
#
# These are deny, not warn, because a warning in a 5,000-line build scroll is
# a warning nobody reads. Tests are exempt via clippy.toml.
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
indexing_slicing = "deny"
integer_division = "deny"
unwrap_in_result = "deny"
# Axum requires every handler to return a future, so a handler that does no io
# is still `async`. This is the framework's contract, not an oversight — the
# alternative is an #[allow] on each one, which is noise that hides real cases.
unused_async = "allow"
# Silent truncation in a size or an offset is the kind of bug that only shows
# up on the one input nobody tested.
cast_possible_truncation = "deny"
cast_sign_loss = "deny"
cast_precision_loss = "deny"
# Profiles are only honoured in the workspace root. Putting them in a member
# manifest is silently ignored, which is where these used to live.
[profile.dev]
# No debuginfo. Debugging here is logs, not a debugger, and debug symbols are
# what turn target/ into tens of gigabytes.
debug = false
strip = "debuginfo"
[profile.test]
debug = false
strip = "debuginfo"
[profile.release]
debug = false
strip = true
lto = true
codegen-units = 1
# A panic in a request handler should take the process down cleanly rather than
# unwinding through a half-updated state. The entrypoint restarts the container.
panic = "abort"