build: optimize profiles

This commit is contained in:
electria 2026-11-09 17:02:01 -08:00
commit 0634af10f1
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
2 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,5 @@
cargo-features = ["profile-rustflags"]
[package]
name = "itop"
description = "top program, made in iced"
@ -13,6 +15,23 @@ sysinfo = "0.39.6"
version = "0.14.0"
features = [ "canvas", "smol" ]
[profile.debug]
debug = true
strip = "none"
debug-assertions = true
overflow-checks = true
[profile.dev]
opt-level = 3
rustflags = ["-Clink-arg=-fuse-ld=mold"]
debug = false
strip = "debuginfo"
debug-assertions = false
overflow-checks = false
[profile.release]
lto = true
panic = "abort"
codegen-units = 1
lto = true
strip = "symbols"

View file

@ -104,7 +104,10 @@
LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps;
inputsFrom = [ crate ];
packages = [ pkgs.rust-analyzer ];
packages = with pkgs; [
rust-analyzer
mold
];
};
}
);