49 lines
1.1 KiB
TOML
49 lines
1.1 KiB
TOML
# Strict Rust compiler configuration for zesdex
|
|||
|
|
# Forces all warnings as errors, enables maximum optimization for release builds.
|
||
|
|
|
||
|
|
[target.'cfg(all())']
|
||
|
|
# Treat all warnings as errors — zero tolerance policy
|
||
|
|
rustflags = [
|
||
|
|
# Force all lints to error level (stricter than -Dwarnings)
|
||
|
|
"-W", "unused",
|
||
|
|
"-W", "dead_code",
|
||
|
|
"-W", "unreachable_code",
|
||
|
|
"-W", "unused_imports",
|
||
|
|
"-W", "unused_variables",
|
||
|
|
"-W", "unused_mut",
|
||
|
|
"-W", "unused_must_use",
|
||
|
|
"-W", "unused_unsafe",
|
||
|
|
"-W", "unused_extern_crates",
|
||
|
|
|
||
|
|
# Safety-critical
|
||
|
|
"-W", "trivial_casts",
|
||
|
|
"-W", "trivial_numeric_casts",
|
||
|
|
|
||
|
|
# Deprecation and future compat
|
||
|
|
"-W", "deprecated",
|
||
|
|
"-W", "deprecated_in_future",
|
||
|
|
"-W", "keyword_idents",
|
||
|
|
"-W", "noop_method_call",
|
||
|
|
|
||
|
|
# Type system
|
||
|
|
"-W", "invalid_type_param_default",
|
||
|
|
"-W", "unused_labels",
|
||
|
|
"-W", "while_true",
|
||
|
|
]
|
||
|
|
|
||
|
|
[profile.release]
|
||
|
|
# Maximum speed optimizations for release builds
|
||
|
|
opt-level = 3
|
||
|
|
debug = false
|
||
|
|
debug-assertions = false
|
||
|
|
overflow-checks = true
|
||
|
|
lto = "fat"
|
||
|
|
codegen-units = 1
|
||
|
|
panic = "abort"
|
||
|
|
strip = "symbols"
|
||
|
|
|
||
|
|
[profile.dev]
|
||
|
|
# Keep dev fast but still strict
|
||
|
|
opt-level = 0
|
||
|
|
debug = true
|