From 26e3c9550a56bdf4fb1639fe89bded4f05fa7bc5 Mon Sep 17 00:00:00 2001 From: Barnaby <22575741+barnabwhy@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:35:17 +0100 Subject: [PATCH] make release builds smaller --- src-tauri/Cargo.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index fd2f925..5dcb62d 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -24,7 +24,10 @@ rfd = { version = "0.14.0", default-features = false, features = ["gtk3"] } chrono = "0.4.37" [profile.release] -strip = true +codegen-units = 1 # Compile crates one after another so the compiler can optimize better +lto = true # Enables link to optimizations +opt-level = "z" # Optimize for binary size +strip = true # Remove debug symbols [features] # this feature is used for production builds or when `devPath` points to the filesystem