From 3ae188be269f1dd820c98621634467bf76e97d39 Mon Sep 17 00:00:00 2001 From: Nicholas Hope Date: Mon, 11 Mar 2024 12:59:48 -0400 Subject: [PATCH] lints and optimisations --- Cargo.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index c4e7906..efac1c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,20 @@ edition = "2021" [dependencies] clap = { version = "4.4.3", features = ["derive"] } rayon = "1.7.0" + +# lints from https://github.com/0atman/noboilerplate/blob/main/scripts/37-functional-rust.md +# these are deliberately extremely restrictive to avoid most of the easily-refactored +# footguns as much as possible. unlike the github lints, this does not forbid unsafe +# code +[lints.clippy] +enum_glob_use = "deny" +pedantic = "deny" +nursery = "deny" +unwrap_used = "deny" + +[profile.release] +opt-level = 'z' # size optimisation +lto = true # link time optimisation +codegen-units = 1 # fewer -> more optimisation +panic = 'abort' # abort on panic +strip = 'symbols' # strip symbols \ No newline at end of file