From 8e8f31e2e6fdd84c50ba62e90d776d072fd7e320 Mon Sep 17 00:00:00 2001 From: Soapydev Date: Mon, 19 Aug 2024 10:24:25 -0400 Subject: [PATCH] Reduce the weight of the produced binary Optimise for weight at the expense of compile time, speed and we strip debuging elements Signed-off-by: Soapydev --- Cargo.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index cacbdcb3..5ed07764 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,14 @@ tempdir = "0.3.7" [[bin]] name = "linutil" path = "src/main.rs" + + + +[profile.release] +opt-level = "z" +debug = false +lto = true +codegen-units = 1 +panic = "abort" +strip = true +incremental = false \ No newline at end of file