File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,20 @@ exclude = [
16
16
" no-std-check" ,
17
17
]
18
18
19
- # Our tests do actual crypto and lots of work, the tradeoff for -O1 is well worth it.
20
- # Ideally we would only do this in profile.test, but profile.test only applies to
21
- # the test binary, not dependencies, which means most of the critical code still
22
- # gets compiled as -O0. See
19
+ # Our tests do actual crypto and lots of work, the tradeoff for -O2 is well
20
+ # worth it. Note that we only apply optimizations to dependencies, not workspace
21
+ # crates themselves.
23
22
# https://doc.rust-lang.org/cargo/reference/profiles.html#profile-selection
23
+ [profile .dev .package ."*" ]
24
+ opt-level = 2
25
+
26
+ # It appears some minimal optimizations are required to inline many std methods
27
+ # and reduce the otherwise-substantial time spent in std self-checks. We do so
28
+ # here but ensure we keep LTO disabled as otherwise we're re-optimizing all our
29
+ # dependencies every time we make any local changes.
24
30
[profile .dev ]
25
31
opt-level = 1
26
- panic = " abort "
32
+ lto = " off "
27
33
28
34
[profile .release ]
29
35
opt-level = 3
You can’t perform that action at this time.
0 commit comments