Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make binary smaller by rebuilding std with -Oz and panic_abort #28

Merged
merged 13 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,16 @@ jobs:
uses: actions-rust-lang/[email protected]
with:
target: ${{ matrix.target }}
toolchain: nightly-2024-05-16

- name: Install cargo-src
run: |
rustup target add ${{ matrix.target }}
rustup component add rust-src --target ${{ matrix.target }}

- name: Build binary
run: cargo build --release --locked --target=${{ matrix.target }} --color=always
# use optimize_for_size in the future (https://github.com/rust-lang/rust/issues/125612)
run: cargo build --release -Z build-std=core,std,alloc,proc_macro,panic_abort -Z build-std-features=panic_immediate_abort --locked --target=${{ matrix.target }} --color=always

- name: Install cargo-deb
if: ${{ matrix.deb == true }}
Expand Down
Loading
Loading