Repository navigation
project: Prefer musl builds of ACP registry agents on musl Linux hosts - #66914
Merged
Merged
Conversation
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.
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.
MrSubidubi
requested changes
Nov 13, 2026
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.
MrSubidubi
approved these changes
Nov 13, 2026
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.
The ACP registry now optionally publishes
linux-{arch}-musltargets. On a musl host (e.g. Alpine), Zed now picks that target and falls back tolinux-{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.util::libc_type::host_libc_type()and cache the result for the process lifetime.ldd --versionstderr, which is where musl prints its version. Previously musl hosts were only detected through the/libscan.Closes #66850
Release Notes: