Skip to content

Commit 4c74586

Browse files
authored
Borrow Cargo.toml's profile.release from RustDesk for better binary (#481)
1 parent 2ac3169 commit 4c74586

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,13 @@ hbb_common = { path = "libs/hbb_common" }
5858
[workspace]
5959
members = ["libs/hbb_common"]
6060
exclude = ["ui"]
61+
62+
#https://github.com/johnthagen/min-sized-rust
63+
#https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles
64+
[profile.release]
65+
lto = true
66+
codegen-units = 1
67+
panic = 'abort'
68+
strip = true
69+
#opt-level = 'z' # only have smaller size after strip # Default is 3, better performance
70+
#rpath = true # Not needed

0 commit comments

Comments
 (0)