Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit 32270bd

Browse files
feat: add musl static binaries for linux (#200)
S2-916 When someone tries to run the binary on a system with an older glibc version: they may get this: s2: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by s2) so we can provide statically linked binaries
1 parent c90a985 commit 32270bd

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ jobs:
2020
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
2121
- os: ubuntu-22.04
2222
target: x86_64-unknown-linux-gnu
23+
- os: ubuntu-22.04
24+
target: x86_64-unknown-linux-musl
25+
deps: |
26+
sudo apt-get update
27+
sudo apt-get install -y musl-tools
28+
- os: ubuntu-22.04
29+
target: aarch64-unknown-linux-musl
30+
deps: |
31+
sudo apt-get update
32+
sudo apt-get install -y wget
33+
wget -q https://musl.cc/aarch64-linux-musl-cross.tgz
34+
tar xzf aarch64-linux-musl-cross.tgz
35+
echo "$PWD/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
2336
- os: macos-latest
2437
target: x86_64-apple-darwin
2538
- os: macos-latest
@@ -42,6 +55,9 @@ jobs:
4255
- name: Set CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
4356
if: matrix.target == 'aarch64-unknown-linux-gnu'
4457
run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
58+
- name: Set CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER
59+
if: matrix.target == 'aarch64-unknown-linux-musl'
60+
run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-musl-gcc" >> $GITHUB_ENV
4561
- name: Build
4662
run: cargo build --release --target ${{ matrix.target }}
4763
- name: Create pem and certificate.der files

0 commit comments

Comments
 (0)