From afa85b97aa860ef52eb37e0176c66334ee8b4a06 Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Thu, 23 Jul 2026 18:39:29 +0200 Subject: [PATCH] chore(packaging): stabilize build process and resource usage Updates the PKGBUILD to improve stability and manage memory consumption during the compilation of large Rust dependencies. This involves adding specific environment variables within the build function to constrain compiler resources, alongside refining package options. - Restrict parallel jobs and set explicit optimization levels for cargo builds - Disable debug symbols in package options --- PKGBUILD | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PKGBUILD b/PKGBUILD index 40f2798..5ece8ec 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -13,7 +13,7 @@ url="https://git.cbsk-tech.de/Christoph/GitLite" license=('MIT') depends=('webkit2gtk-4.1' 'gtk3' 'git' 'hicolor-icon-theme' 'libappindicator-gtk3' 'librsvg' 'xdotool') makedepends=('rust' 'nodejs' 'npm') -options=('!lto') +options=('!lto' '!debug') source=() sha256sums=() @@ -26,6 +26,16 @@ pkgver() { build() { cd "$startdir" + + # mistralrs-core is large enough that the regular release profile (thin LTO, + # one codegen unit and Arch debug flags) can exhaust memory in the LXC build + # runner. Keep the package optimized while bounding peak compiler memory. + export CARGO_BUILD_JOBS=1 + export CARGO_PROFILE_RELEASE_OPT_LEVEL=2 + export CARGO_PROFILE_RELEASE_LTO=false + export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=8 + export CARGO_PROFILE_RELEASE_DEBUG=0 + npm ci # Build through the Tauri CLI (not a raw `cargo build --release`): it enables # the `custom-protocol` cargo feature that makes the binary load the embedded