Skip to content

Commit d76413c

Browse files
stephenleoclaude
andcommitted
Fix Linux glibc compatibility by switching to musl static builds
- Switch Linux release targets from gnu to musl (x86_64 and aarch64) - Add musl-tools install step in release workflow - Update install.sh to download musl binaries on Linux - Add install_private.sh to .gitignore Musl produces fully static binaries with no glibc dependency, ensuring compatibility across all Linux distros (Ubuntu 22.04+, etc). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ec3c6b6 commit d76413c

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,19 @@ jobs:
3838
runner: macos-latest
3939
- target: x86_64-apple-darwin
4040
runner: macos-latest
41-
- target: x86_64-unknown-linux-gnu
41+
- target: x86_64-unknown-linux-musl
4242
runner: ubuntu-latest
43-
- target: aarch64-unknown-linux-gnu
43+
- target: aarch64-unknown-linux-musl
4444
runner: ubuntu-24.04-arm
4545
steps:
4646
- uses: actions/checkout@v4
4747
- name: Install Rust stable
4848
uses: dtolnay/rust-toolchain@stable
4949
with:
5050
targets: ${{ matrix.target }}
51+
- name: Install musl tools (Linux)
52+
if: contains(matrix.target, 'linux-musl')
53+
run: sudo apt-get install -y musl-tools
5154
- uses: Swatinem/rust-cache@v2
5255
- name: Build release binary
5356
run: cargo build --release --target ${{ matrix.target }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ _bmad*
77
/target
88
starship.toml
99

10-
.vscode/
10+
.vscode/
11+
install_private.sh

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ case "$OS" in
1919
;;
2020
Linux)
2121
case "$ARCH" in
22-
x86_64) TARGET="x86_64-unknown-linux-gnu" ;;
23-
aarch64) TARGET="aarch64-unknown-linux-gnu" ;;
22+
x86_64) TARGET="x86_64-unknown-linux-musl" ;;
23+
aarch64) TARGET="aarch64-unknown-linux-musl" ;;
2424
*) echo "Unsupported Linux arch: $ARCH" >&2; exit 1 ;;
2525
esac
2626
;;

0 commit comments

Comments
 (0)