Skip to content

Instantly share code, notes, and snippets.

@Nejat
Created January 10, 2025 18:48
Show Gist options
  • Save Nejat/075bda7a811e42752055ce45df712dec to your computer and use it in GitHub Desktop.
Save Nejat/075bda7a811e42752055ce45df712dec to your computer and use it in GitHub Desktop.
general rust crate clippy and profile settings
[workspace.lints.clippy]
cargo = { priority = -1, level = "deny" }
correctness = { priority = -1, level = "deny" }
complexity = { priority = -1, level = "deny" }
nursery = { priority = -1, level = "deny" }
pedantic = { priority = -1, level = "deny" }
perf = { priority = -1, level = "deny" }
style = { priority = -1, level = "deny" }
suspicious = { priority = -1, level = "deny" }
module_name_repetitions = "allow"
items_after_statements = "allow"
[profile.release]
strip = true # automatically strip symbols from the binary.
opt-level = "z" # optimize for size.
lto = "fat" # link time optimizations
codegen-units = 1 # synchronous compilation
panic = "abort" # minimum panic handling
overflow-checks = false # Disable integer overflow checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment