From 9bcc1a39a48fb9483e6ce79c28021c4f46922ea7 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Tue, 18 Apr 2023 17:07:25 +0800 Subject: [PATCH] :sparkles: Optimize package size --- src-tauri/Cargo.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 971841f..22fe25c 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -30,6 +30,9 @@ default = ["custom-protocol"] custom-protocol = ["tauri/custom-protocol"] # Pay attention to the code size during optimization in order to generate smaller binary files. -# [profile.release] -# opt-level = "s" -# lto = true +[profile.release] +panic = "abort" # Strip expensive panic clean-up logic +codegen-units = 1 # Compile crates one after another so the compiler can optimize better +lto = true # Enables link to optimizations +opt-level = "s" # Optimize for binary size +strip = true # Remove debug symbols