refactor(fspy): gate ipc_channel_conf on non-musl targets#327
Merged
branchseer merged 2 commits intomainfrom Apr 13, 2026
Merged
refactor(fspy): gate ipc_channel_conf on non-musl targets#327branchseer merged 2 commits intomainfrom
branchseer merged 2 commits intomainfrom
Conversation
The IPC channel sender is only used by the preload library, which is not built on musl (only seccomp-based tracking is used there). Mark the `ipc_channel_conf` field, its imports, and its creation site as `#[cfg(not(target_env = "musl"))]` so musl builds don't carry the unused configuration. https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc
There was a problem hiding this comment.
Pull request overview
This PR removes unused IPC channel sender configuration from musl builds by conditionally compiling Payload::ipc_channel_conf (and its associated import and initialization) only on non-musl targets, aligning with the fact that the preload library is not built/used on musl.
Changes:
- Add
#[cfg(not(target_env = "musl"))]gating forPayload::ipc_channel_confand itsChannelConfimport. - Conditionally bind/discard the
ChannelConfreturned bychannel(SHM_CAPACITY)on musl vs non-musl when constructingPayload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/fspy/src/unix/mod.rs | Conditionally captures/discards ipc_channel_conf while keeping ipc_receiver for downstream consumption. |
| crates/fspy_shared_unix/src/payload.rs | Gates ipc_channel_conf field and ChannelConf import to avoid carrying unused config on musl. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
The IPC channel sender is only used by the preload library, which isn't built on musl targets (only seccomp-based tracking is used there). Gate
Payload::ipc_channel_conf, itsChannelConfimport, and its creation/assignment site with#[cfg(not(target_env = "musl"))]so musl builds no longer carry the unused configuration.crates/fspy_shared_unix/src/payload.rscrates/fspy/src/unix/mod.rs— thechannel(SHM_CAPACITY)call is still made (theipc_receiverhalf is consumed downstream), but the conf half is bound to_on muslThe other reference in
crates/fspy_preload_unix/src/client/mod.rsis already effectively gated — the entireclientmodule is#[cfg(all(unix, not(target_env = "musl")))]viacrates/fspy_preload_unix/src/lib.rs.Test plan
cargo check --workspace --all-features(host glibc target)cargo check --workspace --all-features --target x86_64-unknown-linux-muslcargo clippy -p fspy_shared_unix -p fspy --all-features --all-targets -- -D warningshttps://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc