Skip to content

Instantly share code, notes, and snippets.

@storopoli
Created January 30, 2024 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save storopoli/3b27801f103163efa442d3a70aedc99e to your computer and use it in GitHub Desktop.
Save storopoli/3b27801f103163efa442d3a70aedc99e to your computer and use it in GitHub Desktop.
Rust Linters
[lints.rust]
unsafe_code = "forbid" # Forbid unsafe code
[lints.clippy]
enum_glob_use = "deny" # Deny `use Enum::*`
pedantic = "deny" # Deny a bunch of stuff
nursery = "deny" # Deny another bunch of stuff
unwrap_used = "deny" # Deny `.unwrap()`
[profile.release]
opt-level = "z" # Optimized for size, use 3 for speed
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduced to increase optimizations
panic = "abort" # Abort on panic
strip = "symbols" # Strip symbols from binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment