nix-dotfiles/pkgs/edit/Cargo.toml
2025-05-23 12:19:11 -04:00

54 lines
1.7 KiB
TOML

[package]
name = "edit"
version = "1.0.0"
edition = "2024"
[[bench]]
name = "lib"
harness = false
[features]
debug-layout = []
debug-latency = []
# `opt-level = "s"` may be useful in the future 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 seperate *.dwp/*.dSYM so the binary can get stripped
strip = "symbols" # See split-debuginfo - allows us to drop the size by ~65%
[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
[dependencies]
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.59"
features = [
"Win32_Globalization",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Console",
"Win32_System_Diagnostics_Debug",
"Win32_System_IO",
"Win32_System_LibraryLoader",
"Win32_System_Memory",
"Win32_System_Threading",
]
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }