From ca7dec7df0a43281716baab15552b44afc14c503 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Apr 2026 03:07:50 +0000 Subject: [PATCH 1/2] refactor(fspy): gate ipc_channel_conf on non-musl targets 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 --- crates/fspy/src/unix/mod.rs | 5 +++++ crates/fspy_shared_unix/src/payload.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/crates/fspy/src/unix/mod.rs b/crates/fspy/src/unix/mod.rs index 7f946005..56448f7f 100644 --- a/crates/fspy/src/unix/mod.rs +++ b/crates/fspy/src/unix/mod.rs @@ -89,10 +89,15 @@ impl SpyImpl { #[cfg(target_os = "linux")] let supervisor = supervise::().map_err(SpawnError::Supervisor)?; + #[cfg(not(target_env = "musl"))] let (ipc_channel_conf, ipc_receiver) = channel(SHM_CAPACITY).map_err(SpawnError::ChannelCreation)?; + #[cfg(target_env = "musl")] + let (_, ipc_receiver) = + channel(SHM_CAPACITY).map_err(SpawnError::ChannelCreation)?; let payload = Payload { + #[cfg(not(target_env = "musl"))] ipc_channel_conf, #[cfg(target_os = "macos")] diff --git a/crates/fspy_shared_unix/src/payload.rs b/crates/fspy_shared_unix/src/payload.rs index e23f7ce0..d606ca47 100644 --- a/crates/fspy_shared_unix/src/payload.rs +++ b/crates/fspy_shared_unix/src/payload.rs @@ -5,10 +5,12 @@ use bincode::{Decode, Encode, config::standard}; use bstr::BString; #[cfg(not(target_env = "musl"))] use fspy_shared::ipc::NativeStr; +#[cfg(not(target_env = "musl"))] use fspy_shared::ipc::channel::ChannelConf; #[derive(Debug, Encode, Decode)] pub struct Payload { + #[cfg(not(target_env = "musl"))] pub ipc_channel_conf: ChannelConf, #[cfg(not(target_env = "musl"))] From b75f42ce9a43e3010f7ef088f39de12d474a3dac Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 13 Apr 2026 03:25:48 +0000 Subject: [PATCH 2/2] style: apply rustfmt to musl-gated channel binding https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc --- crates/fspy/src/unix/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/fspy/src/unix/mod.rs b/crates/fspy/src/unix/mod.rs index 56448f7f..98077a6d 100644 --- a/crates/fspy/src/unix/mod.rs +++ b/crates/fspy/src/unix/mod.rs @@ -93,8 +93,7 @@ impl SpyImpl { let (ipc_channel_conf, ipc_receiver) = channel(SHM_CAPACITY).map_err(SpawnError::ChannelCreation)?; #[cfg(target_env = "musl")] - let (_, ipc_receiver) = - channel(SHM_CAPACITY).map_err(SpawnError::ChannelCreation)?; + let (_, ipc_receiver) = channel(SHM_CAPACITY).map_err(SpawnError::ChannelCreation)?; let payload = Payload { #[cfg(not(target_env = "musl"))]