From 267307fa2898cdb33cd83aa30d65e95a33fff635 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sun, 3 Jul 2022 18:12:37 +1000 Subject: [PATCH] Set `opt-level` for release to `s` O3 mostly enables float optimization, more aggressive loop unrolling and function inline. O2 is probably OK, but I want to reduce the binary size a bit by using opt level "s". Signed-off-by: Jiahao XU --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index f121f595..c90656f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,6 +69,7 @@ guess_host_triple = "0.1.3" env_logger = "0.9.0" [profile.release] +opt-level = "s" lto = true codegen-units = 1 panic = "abort"