1
0
Fork 0
mirror of https://github.com/alemidev/scope-tui.git synced 2024-11-23 14:14:48 +01:00

build: smaller release binaries

This commit is contained in:
əlemi 2024-02-09 20:19:52 +01:00
parent 635db69aa8
commit 34e7927c74
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -27,3 +27,10 @@ libpulse-simple-binding = { version = "2.25", optional = true }
default = ["tui", "pulseaudio"] default = ["tui", "pulseaudio"]
tui = ["dep:ratatui", "dep:crossterm"] tui = ["dep:ratatui", "dep:crossterm"]
pulseaudio = ["dep:libpulse-binding", "dep:libpulse-simple-binding"] pulseaudio = ["dep:libpulse-binding", "dep:libpulse-simple-binding"]
[profile.release] # make small binaries! will take quite longer, from https://github.com/johnthagen/min-sized-rust
opt-level = 'z' # optimize for size
lto = true # enable Link Time Optimisation: don't link unused stuff
codegen-units = 1 # reducing codegen units slows it down but allows for better optimization
panic = 'abort' # abort on panic: don't include code to show what went wrong in release
strip = "symbols" # strip symbols from binary: have fun debugging on prod! :)