Add release-dist-optimized profile

release-dist-optimized inherits from `release`. Useful if you're distributing librespot at part of a project. The diffrences are:

panic = "abort", Makes librespot abort instead of unwind and hang on a panic.
Extremely useful when running librespot unattended as a system service for example to allow for auto-restarts.

codegen-units = 1 and lto = true, Take slighly longer to compile but produce more optimized binaries.
This commit is contained in:
JasonLG1979 2023-06-23 18:51:17 -05:00
parent 340bac5eb0
commit ad4763005d

View file

@ -77,6 +77,12 @@ passthrough-decoder = ["librespot-playback/passthrough-decoder"]
default = ["rodio-backend"] default = ["rodio-backend"]
[profile.release-dist-optimized]
inherits = "release"
panic = "abort"
codegen-units = 1
lto = true
[package.metadata.deb] [package.metadata.deb]
maintainer = "librespot-org" maintainer = "librespot-org"
copyright = "2018 Paul Liétar" copyright = "2018 Paul Liétar"