From 39e35c19db20fc7f0a2fcf7c1e021f5550dfa4f4 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 2 Jul 2023 13:49:34 -0400 Subject: [PATCH] release build/profile settings to reduce binary size --- Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3cbdcc1..7e18851 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,4 +22,11 @@ syntect = "5.0.0" tera = "1.19.0" thiserror = "1.0.40" tokio = "1" -url = "2.4.0" \ No newline at end of file +url = "2.4.0" + +[profile.release] +# settings that are mainly intended to reduce the size of the release binary while keeping the release binary tuned +# for performance. these alone reduce the binary size by over 50%, which is good enough in my opinion ... +strip = true +lto = true +codegen-units = 1