-
Notifications
You must be signed in to change notification settings - Fork 734
Expand file tree
/
Copy pathCargo.toml
More file actions
27 lines (24 loc) · 1.24 KB
/
Copy pathCargo.toml
File metadata and controls
27 lines (24 loc) · 1.24 KB
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
[workspace]
default-members = ["crates/edit"]
members = ["crates/*"]
resolver = "3"
[workspace.package]
edition = "2024"
license = "MIT"
repository = "https://github.com/microsoft/edit"
rust-version = "1.93"
# We use `opt-level = "s"` as it significantly reduces binary size.
# We could then use the `#[optimize(speed)]` attribute for spot optimizations.
# Unfortunately, that attribute currently doesn't work on intrinsics such as memset.
[profile.release]
codegen-units = 1 # reduces binary size by ~2%
debug = "full" # No one needs an undebuggable release binary
lto = true # reduces binary size by ~14%
opt-level = "s" # reduces binary size by ~25%
panic = "abort" # reduces binary size by ~50% in combination with -Zbuild-std-features=panic_immediate_abort
split-debuginfo = "packed" # generates a separate *.dwp/*.dSYM so the binary can get stripped
strip = "symbols" # See split-debuginfo - allows us to drop the size by ~65%
incremental = true # Improves re-compile times
[profile.bench]
codegen-units = 16 # Make compiling criterion faster (16 is the default, but profile.release sets it to 1)
lto = "thin" # Similarly, speed up linking by a ton