From 6324f9a7ca05caa79fd8d88543b631fb7b906949 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 20 Jul 2022 18:00:22 +1000 Subject: [PATCH] Use `opt-level = "z"` for release On M1 MacOS Darwin 21.5, this produces binary that is 0.3M smaller while taking 10s less to build. Signed-off-by: Jiahao XU --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1a4699a9..85363916 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,7 +78,7 @@ mimalloc = ["dep:mimalloc"] env_logger = "0.9.0" [profile.release] -opt-level = "s" +opt-level = "z" lto = true codegen-units = 1 panic = "abort"