From c08be9abce570e0bfe7010512dbc48ac35a0b7b9 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Thu, 19 Dec 2024 10:17:09 -0500 Subject: [PATCH] build: Change release `opt-level` On my system, I obtained the smallest binary size with `opt-level = 2` (11.8 MB, versus 12.2 MB with `opt-level = "z"`). --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6e0b0595f1..565c8273d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,7 +111,7 @@ winapi = "0.3.9" # We optimize the release build for size. [profile.release] -opt-level = "z" +opt-level = 2 # I obtained the smallest binary size with opt-level 2 on my system. panic = "abort" strip = "debuginfo" # Only strip debuginfo (not symbols) to keep backtraces useful. codegen-units = 1 # Parallel compilation prevents some optimizations.