feat(release): build pixi-riscv64gc-unknown-linux-musl - #6905
Draft
pavelzw wants to merge 2 commits into
Draft
Conversation
Adds the riscv64gc musl target to the release matrix, alongside the existing glibc build. There is no `gcc-riscv64-linux-musl` in apt, so the target is cross-compiled with cargo-zigbuild like the other Linux musl targets. Also: - Build the matching trampoline. `pixi global` embeds a trampoline binary per target; a musl pixi must not ship the glibc-linked riscv64 one. - Teach `self-update` about riscv64. It previously returned no archive name for riscv64, so `pixi self-update` failed there regardless of libc. Refs prefix-dev#6903
pavelzw
commented
Aug 27, 2026
Comment on lines
+102
to
+108
| // riscv64 is released for both glibc and musl; stay on the libc the | ||
| // running binary was built against. | ||
| if cfg!(target_env = "musl") { | ||
| Some("pixi-riscv64gc-unknown-linux-musl.tar.gz".to_string()) | ||
| } else { | ||
| Some("pixi-riscv64gc-unknown-linux-gnu.tar.gz".to_string()) | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| // riscv64 is released for both glibc and musl; stay on the libc the | |
| // running binary was built against. | |
| if cfg!(target_env = "musl") { | |
| Some("pixi-riscv64gc-unknown-linux-musl.tar.gz".to_string()) | |
| } else { | |
| Some("pixi-riscv64gc-unknown-linux-gnu.tar.gz".to_string()) | |
| } | |
| Some("pixi-riscv64gc-unknown-linux-musl.tar.gz".to_string()) |
Comment on lines
+70
to
+79
| #[cfg(target_env = "gnu")] | ||
| const TRAMPOLINE_BIN: &[u8] = | ||
| include_bytes!("../../../trampoline/binaries/pixi-trampoline-riscv64gc-unknown-linux-gnu.zst"); | ||
|
|
||
| #[cfg(target_arch = "riscv64")] | ||
| #[cfg(target_os = "linux")] | ||
| #[cfg(target_env = "musl")] | ||
| const TRAMPOLINE_BIN: &[u8] = | ||
| include_bytes!("../../../trampoline/binaries/pixi-trampoline-riscv64gc-unknown-linux-musl.zst"); | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| #[cfg(target_env = "gnu")] | |
| const TRAMPOLINE_BIN: &[u8] = | |
| include_bytes!("../../../trampoline/binaries/pixi-trampoline-riscv64gc-unknown-linux-gnu.zst"); | |
| #[cfg(target_arch = "riscv64")] | |
| #[cfg(target_os = "linux")] | |
| #[cfg(target_env = "musl")] | |
| const TRAMPOLINE_BIN: &[u8] = | |
| include_bytes!("../../../trampoline/binaries/pixi-trampoline-riscv64gc-unknown-linux-musl.zst"); | |
| const TRAMPOLINE_BIN: &[u8] = | |
| include_bytes!("../../../trampoline/binaries/pixi-trampoline-riscv64gc-unknown-linux-musl.zst"); | |
Addresses review: don't branch on `target_env` in the Rust code. riscv64 now behaves like x86_64 and aarch64, which unconditionally pick the musl trampoline and self-update archive. The musl trampoline is statically linked, so it also runs on glibc riscv64 hosts. That makes the gnu trampoline dead weight, so stop building it and drop the committed binary. The release still ships both gnu and musl pixi builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
riscv64gc-unknown-linux-muslto the release matrix, alongside the existing glibc build. Closes #6903.To answer the question in the issue — nothing fundamental was missing, the target just was never added. Rust ships a tier-2
riscv64gc-unknown-linux-muslstd, and since the other Linux musl targets already cross-compile withcargo-zigbuild, this one needs no new tooling (there is nogcc-riscv64-linux-muslin apt, so zigbuild is the practical route).The release ships both riscv64 pixi builds (gnu and musl). In the Rust code, riscv64 now behaves like x86_64 and aarch64 — no branching on libc:
pixi globalembeds a trampoline binary per target viainclude_bytes!. riscv64 now always embeds the musl one, matching x86_64/aarch64. The musl trampoline is statically linked so it runs on glibc riscv64 hosts too, which makes the gnu trampoline dead weight — it is no longer built, and the committed binary is dropped.self-update.default_archive_name()returnedNonefor riscv64, sopixi self-updatewas already broken there on the existing gnu build. It now resolves to the musl archive.Ordering caveat (why this is still a draft)
crates/pixi_global/src/trampoline.rsreferencespixi-trampoline-riscv64gc-unknown-linux-musl.zst, which does not exist in the repo yet — trampoline binaries are committed by the separatetrampoline.yamlworkflow. So the new CI job will fail oninclude_bytes!until that workflow runs ontrampoline-build-branchand its commit is merged. Same ordering the loong64 support PR (#4163) had, where the cfg landed before the binary.Happy to split this into two PRs (trampoline first, then target) if that's preferable.
install.shleft alone, deliberately#6143 pinned riscv64 to
unknown-linux-gnuininstall.shbecause no musl asset existed. Tempting to flip it back now, butdocs.ymlrepublishesinstall.shfrommainon every docs deploy, so flipping it before a release carries the musl asset would 404 every riscv64 install. It should be flipped in a follow-up after the first release that includes the new asset — and even thenPIXI_VERSION=<older>on riscv64 would need the gnu name. The gnu build is kept, so nothing regresses either way.How Has This Been Tested?
Not built for the new target locally — no riscv64 musl sysroot here, so that part relies on CI. Locally verified:
cargo check -p pixi_global -p pixi_clipasses on the host after the trampoline/self-update changes, all three workflow YAMLs parse, andsh -n install/install.shpasses. The newbuild binary | linux riscv64gc muslCI job builds the workspace for the target on PRs (the existing gnu job ismain-only) — but see the ordering caveat above for why it won't go green as-is.AI Disclosure
Tools: Claude Code (Claude Opus 5)
Checklist: