Skip to content

Commit 5b1bd55

Browse files
add release profile to significantly reduce binary size
1 parent fc1c5c3 commit 5b1bd55

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tauri-todos/src-tauri/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ bytes = "1"
3636
num_cpus = { version = "1.15.0" }
3737
tokio-util = { version = "0.7" }
3838
futures-lite = "2.3.0"
39+
40+
[profile.release]
41+
panic = "abort" # Strip expensive panic clean-up logic
42+
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
43+
lto = true # Enables link to optimizations
44+
opt-level = "s" # Optimize for binary size
45+
strip = true # Remove debug symbols

0 commit comments

Comments
 (0)