[package] name = "blocker-platform-linux" version = "0.1.0" edition = "2021" description = "Linux platform layer: foreground-window detection, enforcement, and system integration for Blocker." license = "UNLICENSED" [lints] workspace = true [lib] name = "blocker_platform_linux" path = "src/lib.rs" [dependencies] blocker-core = { path = "../../core" } # CLAUDE.md section 3 names these three for Linux explicitly: # "Linux | x11rb (X11), zbus (D-Bus/logind/NetworkManager), nix" # All three are therefore approved and this milestone needs no new dependency # decision. # # zbus is BLOCKING, on async-io rather than tokio, deliberately. # # `blocking-api` is what exposes `zbus::blocking`. Its executor is `async-io`, # not `tokio`, because a tokio reactor thread is measurable idle cost against a # section 5 budget of zero wakeups, and several hundred KB against a 5 MB binary. # Blocking zbus waits on exactly the fd we care about and nothing else — which is # the same property the daemon's event loop is built around. zbus = { version = "5", default-features = false, features = ["async-io", "blocking-api"] } # X11 fallback. Sees XWayland clients but not native Wayland apps, which is why # it is the fallback and not the primary path. x11rb = "0.13" # SIGSTOP/SIGCONT for the non-destructive freeze, and process lookup. # `time` for CLOCK_MONOTONIC, which section 1.5.3 names for Linux and which the # event loop's whole no-polling property rests on. nix = { version = "0.29", features = ["signal", "process", "time"] }