[package] name = "edit" version = "1.2.1" edition = "2024" rust-version = "1.87" readme = "README.md" repository = "https://github.com/microsoft/edit" homepage = "https://github.com/microsoft/edit" license = "MIT" categories = ["text-editors"] build = "build/main.rs" [[bench]] name = "lib" harness = false [features] debug-latency = [] # 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 [dependencies] [target.'cfg(unix)'.dependencies] libc = "0.2" [build-dependencies] regex-syntax = { version = "0.8", default-features = false } # The default toml crate bundles its dependencies with bad compile times. Thanks. # Thankfully toml-span exists. FWIW the alternative is yaml-rust (without the 2 suffix). toml-span = { version = "0.5", default-features = false } [target.'cfg(windows)'.build-dependencies] winresource = { version = "0.1.22", default-features = false } [target.'cfg(windows)'.dependencies.windows-sys] version = "0.60" 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.7", features = ["html_reports"] } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } zstd = { version = "0.13", default-features = false }