Use build-std to reduce binary size

This commit is contained in:
Andrew 2026-04-06 14:36:25 +12:00
parent 7d52fd66d0
commit b535690b23

View file

@ -55,7 +55,6 @@ jobs:
env: env:
CARGO_BUILD_TARGET: ${{ matrix.target }} CARGO_BUILD_TARGET: ${{ matrix.target }}
RUSTFLAGS: '-Zlocation-detail=none'
steps: steps:
- name: Checkout source - name: Checkout source
@ -74,7 +73,7 @@ jobs:
with: with:
toolchain: nightly toolchain: nightly
target: ${{ env.CARGO_BUILD_TARGET }} target: ${{ env.CARGO_BUILD_TARGET }}
components: clippy, rustfmt components: clippy, rustfmt, rust-src
cache-bin: false cache-bin: false
cache-shared-key: cache cache-shared-key: cache
@ -125,7 +124,9 @@ jobs:
run: cargo doc --release --no-deps run: cargo doc --release --no-deps
- name: Build CLI binary - name: Build CLI binary
run: cargo build --release run: cargo build --release -Zbuild-std
env:
RUSTFLAGS: '-Zlocation-detail=none -Zunstable-options -Cpanic=immediate-abort'
- name: Upload CLI binary as artifact - name: Upload CLI binary as artifact
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7