From f8c60c9753419b2208b5c6633b4d9668b32196ce Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Fri, 16 Oct 2026 10:32:05 +0200 Subject: [PATCH] build: add a release profile that strips the binaries No package ships a separate debug package, and the unstripped binaries were 43, 24 and 12 MB. LTO stays off, as the packaging comments already said the release profile kept it, and unwinding stays on for the workers that catch panics. --- Cargo.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ce6da98..805ac5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,3 +61,15 @@ async-trait = "0.1" futures = "0.3" fuser = "0.18" libc = "0.2" + +[profile.release] +# No package ships a separate debug package (the PKGBUILD sets `!debug`, the +# RPM spec sets `debug_package` to nil), and the unstripped binaries weighed +# 43 MB (`pdfs`), 24 MB (`pdfs-app`) and 12 MB (`pdfs-tray`). +strip = "symbols" +# Off on purpose: LTO has broken GTK links for this workspace, which is why +# the packages turn it off as well. +lto = false +# `Workers` and the thumbnail build catch panics to keep the daemon alive, so +# unwinding must stay on. +panic = "unwind"