News for hackers. Stuff that matters.
Re:Show HN: Lstr – A modern, interactive tree command writte... by pveierland on Tuesday June 17, 2025 @10:44PM (#44306224)
Building in release:

  cargo build --release
  du -sh ./target/release/lstr -> 4.4M
Building with other release options brings it down to 2.3M:

  [profile.release]
  codegen-units = 1
  opt-level = "s"
  lto = true
  panic = "abort"
  strip = "symbols"
Re:Show HN: Lstr – A modern, interactive tree command writte... by cyann on Wednesday June 18, 2025 @02:16AM (#44307091)
I did some benchmarks on one of our CLI and found that `opt-level = "z"` reduced the size from 2.68M to 2.28M, and shaved 10% on the build time, worth a try.

I'll try with `panic = "abort"` for our next release, thanks for the reminder.