-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable some optimization flags (#71)
- Loading branch information
1 parent
237d517
commit a996478
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
[workspace] | ||
|
||
members = ["crates/*"] | ||
|
||
# Compile all dependencies with some optimizations when building this crate on debug | ||
# This slows down clean builds by about 50%, but the resulting binaries can be orders of magnitude faster | ||
# As clean builds won't occur very often, this won't slow down the development process | ||
[profile.dev.package."*"] | ||
opt-level = 2 | ||
|
||
# Turn on a small amount of optimisation in development mode. This might interfere when trying to use a debugger | ||
# if the compiler decides to optimize some code away, if that's the case, it can be set to 0 or commented out | ||
[profile.dev] | ||
opt-level = 1 | ||
|
||
# Turn on LTO on release mode | ||
[profile.release] | ||
lto = "thin" | ||
codegen-units = 1 | ||
# Stripping the binary reduces the size by ~30%, but the stacktraces won't be usable anymore. | ||
# This is fine as long as we don't have any unhandled panics, but let's keep it disabled for now | ||
# strip = true |