Skip to content

Publish aarch64-unknown-linux-musl binaries #249

Closed

Description

@anelson

In response to #230, you kindly added ARM64 binaries for aarch64-apple-darwin, aarch64-pc-windows-msvc, and aarch64-unknown-linux-gnu. However, aarch64-unknown-linux-musl was not included in that expansion.

I'm trying to enable cargo-auditable from within cargo-dist in my project, but I have customized the build setup a bit to build musl targets in a dedicated Rust Alpine container. That causes a failure in the dist-generated workflow that tries to install cargo-auditable with the install script. The installer script's select_archive_for_arch() has no case for aarch64-unknown-linux-musl-dynamic (or -static), so it hard-errors on that platform:

there isn't a download for your platform aarch64-unknown-linux-musl-dynamic

The x86_64-unknown-linux-musl target works fine since a prebuilt binary exists for that triple, so I assume the musl target for aarch64 was just not used by anyone up until now.

The fix should be a one-line addition to the targets list in Cargo.toml, the same change PR #231 made for the other ARM64 triples. I'm happy to submit a PR if that's helpful.

Activity

  1. Shnatsel commented on Mar 17, 2026

    @Shnatsel
    Member

    The fix should be a one-line addition to the targets list in Cargo.toml, the same change PR #231 made for the other ARM64 triples. I'm happy to submit a PR if that's helpful.

    I'm not sure it's that simple. We're already enabling all available dist targets:

    $ dist init
    let's setup your dist config...
    
    ? Would you like to opt in to the new configuration format?
        Future versions of dist will feature major changes to the
    ✔ Would you like to opt in to the new configuration format?
        Future versions of dist will feature major changes to the
        configuration format, including a new dist-specific configuration file. · no
    ? what platforms do you want to build for?
        (select with arrow keys and space, submit with enter) ›
      [x] Apple Silicon macOS (aarch64-apple-darwin)
      [x] ARM64 Linux (aarch64-unknown-linux-gnu)
      [x] ARM64 Windows (aarch64-pc-windows-msvc)
      [x] Intel macOS (x86_64-apple-darwin)
      [x] x64 Linux (x86_64-unknown-linux-gnu)
      [x] x64 MUSL Linux (x86_64-unknown-linux-musl)
      [x] x64 Windows (x86_64-pc-windows-msvc)
    

    There is no aarch64-unknown-linux-musl option; so I'm not sure if this will actually work or not.

    I'm not really willing to maintain a custom, complex cargo-dist configuration. Please contribute aarch64-unknown-linux-musl support to cargo-dist itself so that it exposes it as a supported option, and then I'll gladly enable it.

  2. Shnatsel commented on Mar 17, 2026

    @Shnatsel
    Member

    Or, since you're using a custom container anyway, you might as well install cargo auditable into it yourself. I'm not sure if cargo dist will try to download a release anyway, but it should be a trivial upstream patch to make it not do that.

  3. anelson commented on Mar 18, 2026

    @anelson
    ContributorAuthor

    Ah, yes you're right. Installing cargo auditable unfortunately doesn't help, since cargo-dist unconditionally runs the cargo-auditable install script which fails when the target is unsupported. I'll see about getting that target supported in cargo-dist, and come back here when it's done. Thanks for the quick response!

  4. added a commit that references this issue on Mar 18, 2026
    7ce8b68
  5. bjorn3 commented on Mar 18, 2026

    @bjorn3

    You can use cargo install cargo-auditable instead of using the precompiled binaries.

  6. anelson commented on Mar 18, 2026

    @anelson
    ContributorAuthor

    You can use cargo install cargo-auditable instead of using the precompiled binaries.

    I wasn't able to get that to work, because cargo-dist will still try to explicitly install cargo-auditable with its install script, which then fails because there are no musl aarch64 binaries.

    I've submitted a PR here to enable that build target in cargo-dist which I think will solve the problem.

  7. bjorn3 commented on Mar 18, 2026

    @bjorn3

    I wasn't able to get that to work, because cargo-dist will still try to explicitly install cargo-auditable with its install script, which then fails because there are no musl aarch64 binaries.

    This was a suggestion to do during your container build in the place of downloading a precompiled binary. No cargo-dist would be involved when doing that.

    Given that it turns out cargo-dist is able to build for arm64 musl, #250 is probably a nicer solution though.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions