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

fix: use cross instead of musl.cc for static bins#202

Merged
infiniteregrets merged 3 commits intomainfrom
m/fix-muslcc
Jan 20, 2026
Merged

fix: use cross instead of musl.cc for static bins#202
infiniteregrets merged 3 commits intomainfrom
m/fix-muslcc

Conversation

@infiniteregrets
Copy link
Member

No description provided.

@infiniteregrets infiniteregrets requested a review from a team as a code owner January 20, 2026 03:40
@greptile-apps
Copy link

greptile-apps bot commented Jan 20, 2026

Greptile Summary

Replaced manual download and setup of the aarch64 musl cross-compilation toolchain from musl.cc with the cross tool for building static Linux binaries.

Key changes:

  • Removed manual wget download of aarch64-linux-musl-cross.tgz from musl.cc
  • Removed manual PATH setup for the downloaded toolchain
  • Added use_cross: true flag to the aarch64-unknown-linux-musl matrix entry
  • Added Install cross step that installs from the official cross-rs repository
  • Updated build command to use cross instead of cargo when use_cross is true
  • Removed the now-unnecessary CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER environment variable

This improves maintainability by using a well-maintained community tool instead of manually managing cross-compilation toolchains.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change replaces a manual, brittle toolchain setup with a well-maintained standard tool (cross) from the official cross-rs project. The conditional logic is clean, and the approach aligns with Rust ecosystem best practices for cross-compilation.
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/release.yml Replaced manual musl.cc toolchain download with cross tool for aarch64-unknown-linux-musl builds, improving maintainability

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Setup as Setup Steps
    participant CrossTool as Cross Tool
    participant Cargo as Cargo Build
    participant Artifact as Artifact Upload

    Note over GHA,Artifact: aarch64-unknown-linux-musl target build flow

    GHA->>Setup: Checkout code
    GHA->>Setup: Setup Rust toolchain
    
    alt use_cross = true
        Setup->>CrossTool: Install cross from GitHub
        CrossTool-->>Setup: cross installed
        Setup->>Cargo: cross build --release --target aarch64-unknown-linux-musl
    else use_cross = false
        Setup->>Cargo: cargo build --release --target <target>
    end
    
    Cargo-->>Setup: Build complete
    Setup->>Artifact: Prepare and upload artifacts
    Artifact-->>GHA: Build artifacts ready
Loading

@infiniteregrets infiniteregrets merged commit cfd3005 into main Jan 20, 2026
5 checks passed
@infiniteregrets infiniteregrets deleted the m/fix-muslcc branch January 20, 2026 03:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant