mirror of https://github.com/microsoft/edit
33 lines
1.4 KiB
TOML
33 lines
1.4 KiB
TOML
[workspace]
|
|
default-members = ["crates/edit"]
|
|
members = ["crates/*"]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
edition = "2024"
|
|
license = "MIT"
|
|
repository = "https://github.com/microsoft/edit"
|
|
rust-version = "1.88"
|
|
|
|
# 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
|
|
|
|
[workspace.dependencies]
|
|
edit = { path = "./crates/edit" }
|
|
stdext = { path = "./crates/stdext" }
|
|
unicode-gen = { path = "./crates/unicode-gen" }
|