build(rust): optimize release binary size (thin LTO, strip symbols, s-level, codegen-units=1, panic=abort)\n\n- Helps reduce final AppImage size by trimming Rust binary

This commit is contained in:
Jason
2025-09-11 10:17:35 +08:00
parent 310086d5c9
commit 319e5fa61a

View File

@@ -32,3 +32,11 @@ toml = "0.8"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.5"
objc2-app-kit = { version = "0.2", features = ["NSColor"] }
# Optimize release binary size to help reduce AppImage footprint
[profile.release]
codegen-units = 1
lto = "thin"
opt-level = "s"
panic = "abort"
strip = "symbols"