Skip to content

refactor(fspy): gate ipc_channel_conf on non-musl targets#327

Merged
branchseer merged 2 commits intomainfrom
claude/mark-ipc-channel-musl-zbwSJ
Apr 13, 2026
Merged

refactor(fspy): gate ipc_channel_conf on non-musl targets#327
branchseer merged 2 commits intomainfrom
claude/mark-ipc-channel-musl-zbwSJ

Conversation

@branchseer
Copy link
Copy Markdown
Member

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, its ChannelConf import, and its creation/assignment site with #[cfg(not(target_env = "musl"))] so musl builds no longer carry the unused configuration.

  • Field & import in crates/fspy_shared_unix/src/payload.rs
  • Creation and struct-init in crates/fspy/src/unix/mod.rs — the channel(SHM_CAPACITY) call is still made (the ipc_receiver half is consumed downstream), but the conf half is bound to _ on musl

The other reference in crates/fspy_preload_unix/src/client/mod.rs is already effectively gated — the entire client module is #[cfg(all(unix, not(target_env = "musl")))] via crates/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-musl
  • cargo clippy -p fspy_shared_unix -p fspy --all-features --all-targets -- -D warnings

https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc

claude added 2 commits April 13, 2026 03:07
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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for Payload::ipc_channel_conf and its ChannelConf import.
  • Conditionally bind/discard the ChannelConf returned by channel(SHM_CAPACITY) on musl vs non-musl when constructing Payload.

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.

@branchseer branchseer merged commit 2f1e32b into main Apr 13, 2026
13 checks passed
@branchseer branchseer deleted the claude/mark-ipc-channel-musl-zbwSJ branch April 13, 2026 03:31
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.

3 participants