Created
March 8, 2020 04:04
-
-
Save Ujang360/8f413a44a54d774d4d09fb584432b559 to your computer and use it in GitHub Desktop.
Rust build optimization template
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
[workspace] | |
members = [ | |
"app0", | |
"lib0", | |
] | |
[profile.dev] | |
opt-level = 0 | |
debug = true | |
rpath = false | |
lto = false | |
debug-assertions = true | |
codegen-units = 16 | |
panic = 'unwind' | |
incremental = true | |
overflow-checks = true | |
[profile.release] | |
opt-level = 3 | |
debug = false | |
rpath = false | |
lto = 'fat' | |
debug-assertions = false | |
codegen-units = 1 | |
panic = 'abort' | |
incremental = false | |
overflow-checks = false | |
[profile.test] | |
opt-level = 0 | |
debug = 2 | |
rpath = false | |
lto = false | |
debug-assertions = true | |
codegen-units = 16 | |
incremental = true | |
overflow-checks = true | |
[profile.bench] | |
opt-level = 3 | |
debug = false | |
rpath = false | |
lto = true | |
debug-assertions = false | |
codegen-units = 1 | |
incremental = false | |
overflow-checks = false |
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
# .cargo/config | |
[llvm] | |
ninja = true | |
static-libstdcpp = true | |
[install] | |
rustflags = ["--emit=asm", "-C link-arg=-s", "-C target-cpu=native"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment