Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 9 additions & 112 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ serde = "1.0.219"
serde_json = "1.0.140"
serde_norway = "0.9.42"
sha2 = "0.11.0"
shared_memory = "0.12.4"
shell-escape = "0.1.5"
similar = "3.0.0"
smallvec = { version = "2.0.0-alpha.12", features = ["std"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/fspy_shared/src/ipc/channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl Deref for Sender {
}

#[cfg_attr(
not(target_os = "linux"),
target_os = "windows",
expect(
clippy::non_send_fields_in_send_ty,
reason = "`Sender` holds a shared file lock that ensures there's no reader, so `shm` can be safely written to"
Expand All @@ -135,7 +135,7 @@ pub struct Receiver {
}

#[cfg_attr(
not(target_os = "linux"),
target_os = "windows",
expect(
clippy::non_send_fields_in_send_ty,
reason = "Receiver doesn't read or write `shm`. It only passes it to `ReceiverLockGuard` under the lock"
Expand Down
9 changes: 6 additions & 3 deletions crates/fspy_shm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ license.workspace = true
publish = false
rust-version.workspace = true

[target.'cfg(not(any(target_os = "linux", target_os = "windows")))'.dependencies]
shared_memory = { workspace = true, features = ["logging"] }

[target.'cfg(target_os = "linux")'.dependencies]
memmap2 = { workspace = true }
passfd = { workspace = true, features = ["async"] }
Expand All @@ -19,6 +16,12 @@ tokio-util = { workspace = true }
tracing = { workspace = true }
uuid = { workspace = true, features = ["v4"] }

[target.'cfg(target_os = "macos")'.dependencies]
base64 = { workspace = true }
memmap2 = { workspace = true }
rustix = { workspace = true, features = ["fs", "shm"] }
uuid = { workspace = true, features = ["v4"] }

[target.'cfg(target_os = "windows")'.dependencies]
uuid = { workspace = true, features = ["v4"] }
windows-sys = { workspace = true, features = [
Expand Down
3 changes: 2 additions & 1 deletion crates/fspy_shm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The channel hides that difference with its lock file. [`ChannelConf::sender`](..
Each platform keeps its implementation rationale beside its source:

- [Linux: `memfd` with a descriptor broker](src/linux/README.md)
- [macOS: named POSIX shared memory](src/macos/README.md)
- [Windows: sparse file-backed named mapping](src/windows/README.md)

At this point in the stack, macOS still delegates mapping creation and opening to the [`shared_memory`](https://crates.io/crates/shared_memory) crate.
All implementations provide the API above. Their identifiers and operating system objects differ. Each platform README explains the chosen API and why the previous `shared_memory` backend did not meet its requirements.
Loading
Loading