Skip to content

fix(ci): add rustup target add for workspace-pinned toolchain in binary-release#1092

Merged
noahgift merged 1 commit into
mainfrom
fix/musl-target-rustup
Apr 27, 2026
Merged

fix(ci): add rustup target add for workspace-pinned toolchain in binary-release#1092
noahgift merged 1 commit into
mainfrom
fix/musl-target-rustup

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

Summary

  • The dtolnay/rust-toolchain action's targets: parameter installs targets on the action-resolved toolchain, but rust-toolchain.toml pins channel 1.93.0 which overrides it for any cargo invocation in the workspace.
  • Native cross-compiles (x86_64-musl) consequently fail with can't find crate for core — the pinned toolchain has no musl target.
  • Add an explicit `rustup target add ${{ matrix.target }}` step gated on `!matrix.cross` (the cross targets use the cross Docker image which carries its own toolchain, so they don't hit this).

Why

Same root cause as the fix already merged in paiml/forjar PR #124 and paiml/bashrs PR #200. All paiml workspaces with a pinned rust-toolchain.toml exhibit the same failure mode for native cross-compiles in binary-release.yml.

Evidence

The v0.31.2 backfill ran the unfixed workflow:

  • aarch64-unknown-linux-gnu — succeeded (cross image, unaffected)
  • aarch64-unknown-linux-musl — succeeded (cross image, unaffected)
  • x86_64-unknown-linux-gnu — succeeded (gnu target ships on rust-toolchain.toml's host triple)
  • x86_64-unknown-linux-musl — failed with can't find crate for core

Once this PR merges I'll re-trigger the v0.31.2 backfill via gh workflow run "Binary Release" -f tag=v0.31.2 to attach the missing musl tarball.

Test plan

  • Edit adds the step in the same place as the bashrs PR (between the dtolnay action and Install musl tools)
  • Step is gated on !matrix.cross so it only runs for native targets
  • CI: binary-release workflow on this PR completes (workflow runs on release: published and workflow_dispatch only, so PR CI doesn't exercise it directly — verification happens at the next backfill)

🤖 Generated with Claude Code

…mpiles

The dtolnay/rust-toolchain action's `targets:` parameter installs the
target on the action-resolved toolchain, but rust-toolchain.toml in the
workspace pins channel 1.93.0 which overrides it for any cargo invocation
in the tree. Native cross-compiles (x86_64-musl) consequently fail with
`can't find crate for core` — the pinned toolchain has no musl target
installed, even though the action thinks it does.

Mirrors the fix already merged in paiml/forjar PR #124 and paiml/bashrs
PR #200 (same root cause across all paiml workspaces with a pinned
rust-toolchain.toml). Without this fix, v0.31.2 backfill failed
x86_64-musl while the other 3 targets succeeded — exactly the
symptom forjar exhibited before #124.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift merged commit 8776d46 into main Apr 27, 2026
19 of 21 checks passed
@noahgift noahgift deleted the fix/musl-target-rustup branch April 27, 2026 16:52
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