You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optimized settings should be on the release profile directly instead of a separate release-lto, since that's what cargo install uses from crates.io and anyone installing from there won't get a proper release build. I also don't think we need to account for local development here since we can just use the debug build for that anyway.
Ripgrep does it this way, but they also document it in their README on the cargo install path:
If you're a Rust programmer, ripgrep can be installed with cargo.
...
Note that the binary may be bigger than expected because it contains debug symbols. This is intentional. To remove debug symbols and therefore reduce the file size, run strip on the binary.
Since cargo install is one of our main install methods I'm not sure this is the right call for us. What's the argument for keeping it this way over just putting the optimized settings on the release profile directly?
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
release-ltoprofile inheriting fromreleasewith fat LTO, single codegen unit, symbol stripping, and abort-on-panicreleaseprofile lean withdebug = 1for backtraces during local development--profile release-ltoso published binaries pick up the optimizations