Skip to content

Enable aarch64-unknown-linux-musl build target in cargo-dist#250

Merged
Shnatsel merged 3 commits intorust-secure-code:masterfrom
anelson:master
Mar 18, 2026
Merged

Enable aarch64-unknown-linux-musl build target in cargo-dist#250
Shnatsel merged 3 commits intorust-secure-code:masterfrom
anelson:master

Conversation

@anelson
Copy link
Contributor

@anelson anelson commented Mar 18, 2026

It turns out that cargo-dist does support the aarch64-unknown-linux-musl target it just has to be enabled. In the workspace.metadata.dist section in Cargo.toml I just added aarch64-unknown-linux-musl:

targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "aarch64-pc-windows-msvc", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "x86_64-pc-windows-msvc"]

In my fork I then made a new "release" tag and confirmed that it built and published to artifacts the aarch64 musl bits.

You can see the Release workflow built on my fork here. The specific aarch64-unknown-linux-musl build is here.

Closes #249

@Shnatsel
Copy link
Member

I do agree that supporting aarch64 musl target is worthwhile. However, I'm not keen on enabling a build target that just so happens to work right now but isn't officially supported and therefore could break at any moment.

Could you open a PR to cargo-dist adding support for this target? Once it's continually tested in upstream CI and subsequent upstream changes are accounting for its existence, the risk of unpredictable breakage should be eliminated.

@anelson
Copy link
Contributor Author

anelson commented Mar 18, 2026

As far as I know it is officially supported. I got this idea from axodotdev/cargo-dist#1581.

In the code it seems explicit that this is one of the targets that cargo-dist knows about:

https://github.com/axodotdev/cargo-dist/blob/e94ddf67c1887946b838130077e8e43665c23257/cargo-dist/src/platform/targets.rs#L129-L142

In the docs section on custom runners it specifically shows a config for aarch-unknown-linux-musl.

The latest cargo-dist release includes aarch64-unknown-linux-musl binaries.

It seems fully supported already as far as I can see...

@Shnatsel Shnatsel merged commit ab0d04c into rust-secure-code:master Mar 18, 2026
11 checks passed
@Shnatsel
Copy link
Member

Merged, thanks. But it won't take effect until I cut the next release, which might take a while.

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.

Publish aarch64-unknown-linux-musl binaries

2 participants