Skip to content

project: Prefer musl builds of ACP registry agents on musl Linux hosts - #66914

Merged
benbrandt merged 3 commits into
mainfrom
acp-registry-musl-builds
Nov 13, 2026
Merged

benbrandt merged 3 commits into
mainfrom
acp-registry-musl-builds

Conversation

@benbrandt

@benbrandt benbrandt commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

The ACP registry now optionally publishes linux-{arch}-musl targets. On a musl host (e.g. Alpine), Zed now picks that target and falls back to linux-{arch} when an agent doesn't publish one.

The host libc is detected at runtime rather than with cfg!(target_env = "musl"): the Linux remote server is a static musl binary that mostly runs on glibc hosts, and the desktop build is glibc.

  • Move the libc probe from the rust-analyzer adapter into util::libc_type::host_libc_type() and cache the result for the process lifetime.
  • Also read ldd --version stderr, which is where musl prints its version. Previously musl hosts were only detected through the /lib scan.
  • Use one ordered list of registry platform keys for both the "supported on this platform" check and the archive selection, so the registry UI and the installer agree.

Closes #66850

Release Notes:

  • Improved ACP registry agent installation on musl-based Linux systems to use musl builds when available

Detect the host libc at runtime and try the registry's linux-{arch}-musl
target first, falling back to linux-{arch}. The detection moves out of
the rust-analyzer adapter into util so both can share it, and now also
reads ldd's stderr, which is where musl prints its version.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Nov 13, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Nov 13, 2026
@benbrandt
benbrandt requested a review from MrSubidubi November 13, 2026 07:48
@benbrandt benbrandt changed the title Prefer musl builds of ACP registry agents on musl Linux hosts project: Prefer musl builds of ACP registry agents on musl Linux hosts Nov 13, 2026
The probe spawns ldd and reads /lib with real I/O, which the
deterministic test scheduler can't drive, so registry refresh never
finished under run_until_parked on Linux.
Comment thread crates/util/src/libc_type.rs Resolved
Use cfg_select! for the libc probe gate, join target keys with
itertools instead of collecting first, and return as soon as the musl
loader is found in /lib.
@benbrandt
benbrandt requested a review from MrSubidubi November 13, 2026 12:16
@benbrandt
benbrandt enabled auto-merge November 13, 2026 12:24
@benbrandt
benbrandt added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit cb48e27 Nov 13, 2026
39 checks passed
@benbrandt
benbrandt deleted the acp-registry-musl-builds branch November 13, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Agent (ACP registry) downloads glibc binary on Alpine/musl, fails with "No such file or directory"

2 participants