From ad4763005d172eeea7717a928239dbf833182b1e Mon Sep 17 00:00:00 2001 From: JasonLG1979 Date: Fri, 23 Jun 2023 18:51:17 -0500 Subject: [PATCH] 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. --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 98b8405b..e0999014 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,12 @@ passthrough-decoder = ["librespot-playback/passthrough-decoder"] default = ["rodio-backend"] +[profile.release-dist-optimized] +inherits = "release" +panic = "abort" +codegen-units = 1 +lto = true + [package.metadata.deb] maintainer = "librespot-org" copyright = "2018 Paul LiƩtar"