Skip to content

Commit cf9ac9d

Browse files
committed
ci: switch Linux release builds to musl for static binaries
- Change Linux targets from gnu to musl (x86_64-unknown-linux-musl, aarch64-unknown-linux-musl) for fully static binaries that run on any Linux regardless of glibc version - Switch reqwest from native-tls to rustls-tls to eliminate OpenSSL dependency (required for musl, pure Rust TLS) - Add musl-tools installation step in release workflow - Update CI docs with musl details
1 parent 621c91a commit cf9ac9d

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
matrix:
4343
include:
4444
- os: ubuntu-latest
45-
target: x86_64-unknown-linux-gnu
45+
target: x86_64-unknown-linux-musl
4646
- os: ubuntu-24.04-arm
47-
target: aarch64-unknown-linux-gnu
47+
target: aarch64-unknown-linux-musl
4848
- os: windows-latest
4949
target: x86_64-pc-windows-msvc
5050
- os: macos-14
@@ -59,6 +59,9 @@ jobs:
5959
- uses: Swatinem/rust-cache@v2
6060
with:
6161
shared-key: "ferrumc"
62+
- name: Install musl-tools
63+
if: runner.os == 'Linux'
64+
run: sudo apt-get update && sudo apt-get install -y musl-tools
6265
- name: Build
6366
run: cargo build --profile production --target ${{ matrix.target }} --all-features
6467
- name: Package (Linux/macOS)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ rusty_pool = "0.7.0"
169169
crossbeam-queue = "0.3.12"
170170

171171
# Network
172-
reqwest = { version = "0.13.1", features = ["json", "native-tls", "blocking", "http2"], default-features = false }
172+
reqwest = { version = "0.13.1", features = ["json", "rustls-tls", "blocking", "http2"], default-features = false }
173173

174174
# Error handling
175175
thiserror = "2.0.18"

docs/ci/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Both jobs run in parallel with no dependency between them.
3131

3232
| OS | Target | Archive Format |
3333
|---|---|---|
34-
| `ubuntu-latest` | `x86_64-unknown-linux-gnu` | `.tar.gz` |
35-
| `ubuntu-24.04-arm` | `aarch64-unknown-linux-gnu` | `.tar.gz` |
34+
| `ubuntu-latest` | `x86_64-unknown-linux-musl` | `.tar.gz` |
35+
| `ubuntu-24.04-arm` | `aarch64-unknown-linux-musl` | `.tar.gz` |
3636
| `windows-latest` | `x86_64-pc-windows-msvc` | `.zip` |
3737
| `macos-14` | `aarch64-apple-darwin` | `.tar.gz` |
3838

@@ -41,7 +41,9 @@ Both jobs run in parallel with no dependency between them.
4141
Archives: `ferrumc-{tag}-{target}.tar.gz` (or `.zip` for Windows)
4242
Checksums: `ferrumc-{tag}-{target}.tar.gz.sha256` (or `.zip.sha256`)
4343

44-
Example: `ferrumc-v1.0.0-x86_64-unknown-linux-gnu.tar.gz`
44+
Example: `ferrumc-v1.0.0-x86_64-unknown-linux-musl.tar.gz`
45+
46+
Linux binaries are statically linked via musl libc, so they run on any Linux distribution regardless of glibc version. The `musl-tools` package is installed during CI builds. The project uses `rustls-tls` (pure Rust) instead of `native-tls` (OpenSSL) to avoid native library dependencies.
4547

4648
#### Platform-Specific Packaging
4749

0 commit comments

Comments
 (0)