Created
October 18, 2023 13:03
-
-
Save thebapi/a2a9e777b55471a189ca76d909a2d967 to your computer and use it in GitHub Desktop.
Optimize rust build file
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
| To reduce the build file size please add the following setting into the cargo.toml | |
| [profile.release] | |
| opt-level = 'z' # Optimize for size | |
| lto = true # Enable link-time optimization | |
| codegen-units = 1 # Reduce number of codegen units to increase optimizations | |
| panic = 'abort' # Abort on panic | |
| strip = true # Strip symbols from binary* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment