From 55178e60fdb9866c0135ce2c3097424fd5659112 Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Sat, 28 Jun 2025 00:40:40 -0700 Subject: [PATCH 1/2] cargo/config: strip debuginfo from release bins rustc -C strip=debuginfo leaves the symbol table intact, meaning RUST_BACKTRACE=1 on the installer still produces helpful output. This significantly reduces the binary size, eg the amd64 installer goes from 93M to 21M. Stripping the symbol table only reclaims a further ~2M. --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 16ae724..c63a35f 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -28,6 +28,7 @@ rustflags = ["-C", "target-feature=+crt-static"] # keep line numbers in stack traces for non-firmware binaries [profile.release] debug = "limited" +strip = "debuginfo" # optimizations to reduce the binary size of firmware binaries [profile.firmware] @@ -38,4 +39,3 @@ lto = true codegen-units = 1 panic = "abort" debug = false - From a4f4e12a57871ff421a92eba3190d83b38e869da Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Sat, 28 Jun 2025 00:54:44 -0700 Subject: [PATCH 2/2] ci: build everything when .cargo changes --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62daa2f..21206c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: lcommit=${{ github.event.pull_request.base.sha || 'origin/main' }} # If we are on main, or if these workflow files are being changed, run everything - if [ ${{ github.ref }} = 'refs/heads/main' ] || git diff --name-only $lcommit..HEAD | grep -qe ^.github/workflows/ + if [ ${{ github.ref }} = 'refs/heads/main' ] || git diff --name-only $lcommit..HEAD | grep -qe ^.github/workflows/ -e ^.cargo then echo "building everything" echo code_count=forced >> "$GITHUB_OUTPUT"