File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ edition = '2024'
77
88# https://github.com/johnthagen/min-sized-rust
99[profile .release ]
10- lto = true # Enable link-time optimization
11- codegen-units = 1 # Reduce number of codegen units to increase optimizations
12- panic = ' abort' # Abort on panic
13- strip = true # Strip symbols from binary
10+ codegen-units = 1 # reduces binary size by ~2%
11+ debug = " full" # No one needs an undebuggable release binary
12+ lto = true # reduces binary size by ~14%
13+ opt-level = " s" # reduces binary size by ~25%
14+ panic = " abort" # reduces binary size by ~50% in combination with -Zbuild-std-features=panic_immediate_abort
15+ split-debuginfo = " packed" # generates a seperate *.dwp/*.dSYM so the binary can get stripped
16+ strip = " symbols" # See split-debuginfo - allows us to drop the size by ~65%
1417
1518[dependencies ]
1619axum = " 0.8"
You can’t perform that action at this time.
0 commit comments