-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
29 lines (26 loc) · 1.3 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[workspace]
resolver = "2"
members = [
"saiga",
"saiga_backend",
"saiga_vte",
"saiga_frontend",
"saiga_input",
"saiga_macros",
]
# https://deterministic.space/high-performance-rust.html
[profile.release]
# The first thing we’ll do is enable link-time optimization (LTO).
# It’s a kind of whole-program or inter-module optimization as it runs as the very last step when linking the different parts of your binary together.
# You can think of it as allowing better inlining across dependency boundaries (but it’s of course more complicated that that).
# Rust can use multiple linker flavors, and the one we want is “optimize across all crates”, which is called “fat”.
lto = "fat"
# Next up is a similar topic.
# To speed up compile times, Rust tries to split your crates into small chunks and compile as many in parallel as possible.
# The downside is that there’s less opportunities for the compiler to optimize code across these chunks.
# So, let’s tell it to do one chunk per crate
codegen-units = 1
# Now we get into some of the more unsafe options.
# Remember how Rust by default uses stack unwinding (on the most common platforms)?
# That costs performance! Let’s skip stack traces and the ability to catch panics for reduced code size and better cache usage
panic = "abort"