File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,14 @@ which optimizes the binary for **speed**. To instruct Cargo to optimize for mini
65
65
opt-level = " z" # Optimize for size.
66
66
```
67
67
68
+ Note that in some cases the ` "s" ` level may result in a smaller binary than ` "z" ` , as explained in
69
+ the
70
+ [ ` opt-level ` documentation] ( https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level ) :
71
+
72
+ > It is recommended to experiment with different levels to find the right balance for your project.
73
+ There may be surprising results, such as ... the ` "s" ` and ` "z" ` levels not being necessarily
74
+ smaller.
75
+
68
76
# Enable Link Time Optimization (LTO)
69
77
70
78
![ Minimum Rust: 1.0] ( https://img.shields.io/badge/Minimum%20Rust%20Version-1.0-brightgreen.svg )
You can’t perform that action at this time.
0 commit comments