From 8fc72814c84c6523c42fa40bc215391b0d3c6ebc Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 21 Oct 2025 00:14:58 +0800 Subject: [PATCH] build: optimize release profile for better performance Upstream Tauri fixed the stack overflow in the invoke handler (https://github.com/tauri-apps/tauri/pull/14170) in v2.9.0, so we can safely use opt-level 3 now. --- src-tauri/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 932887822..b80109eaa 100755 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -136,9 +136,9 @@ harness = false [profile.release] panic = "abort" -codegen-units = 16 +codegen-units = 1 lto = "thin" -opt-level = 2 +opt-level = 3 debug = false strip = true overflow-checks = false @@ -156,8 +156,8 @@ rpath = false [profile.fast-release] inherits = "release" -incremental = true codegen-units = 64 +incremental = true lto = false opt-level = 0 debug = true