Skip to content

Conversation

@aabmets
Copy link

@aabmets aabmets commented Jan 30, 2026

This PR introduces support for statically compiled binaries using musl libc for Linux targets (x86_64 and aarch64), making the rustfs-cli more portable across Linux distributions without glibc dependencies. It also adds a check for the presence of CARGO_REGISTRY_TOKEN to conditionally enable crate publishing to crates.io, preventing failures in forks or environments without the token.

Key changes:

  • Build Matrix Updates:
    Added new statically-compiled entries for x86_64-unknown-linux-musl and aarch64-unknown-linux-musl targets. Changed the dynamically-linked glibc x86_64 target to run on ubuntu-22.04 for better glibc compatibility across systems.

  • Workflow Steps:
    Added rustup target add step for all targets and musl-tools installation for musl-based builds to support compilation of dependencies like ring.

  • Build Check Enhancements:
    Detect if CARGO_REGISTRY_TOKEN is set and output has_token for conditional logic.

  • Publish Job:
    Only run if it's a release build and the token is available.

These changes ensure broader compatibility for distributed binaries and safer publishing workflows.

You can validate the successful compilation of the binaries from the workflow run in the fork:
https://github.com/aabmets/rustfs-cli/actions/runs/21518772103

You can test the binaries compiled in the fork from the release published in the fork:
https://github.com/aabmets/rustfs-cli/releases/tag/v0.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant