Getǣl — Read-only macOS home directory disk usage cartography & APFS telemetry service

Add Linux support (XDG paths, statvfs+/proc/mounts, inotify ENOSPC fallback, systemd --user) #17

Merged zip.mu.social
targeting dev from feat/linux-support
Merged opened by zip.mu.social
targeting dev from feat/linux-support

Resolves #11.

Summary #

  • Dependencies: Gate notify's macos_fsevent feature to cfg(target_os = "macos") in Cargo.toml.
  • Platform Directories: Add PlatformDirs::resolve with XDG Base Directory support ($XDG_CONFIG_HOME, $XDG_CACHE_HOME, $XDG_STATE_HOME) on Linux.
  • Volume & Snapshot Telemetry: Add LinuxVolumeTelemetry using libc::statvfs + /proc/mounts (longest mount prefix + octal escape decoding) and UnavailableSnapshotProvider, exposing platform, filesystem_type, and snapshots_supported in /api/health, /api/volume, and /api/snapshots.
  • Filesystem Watcher: Introduce NativeFsWatcher handling Linux inotify ENOSPC / MaxFilesWatch gracefully with a warning + sysctl guidance and falling back to periodic rescanning, plus mapping Flag::Rescan with empty paths (IN_Q_OVERFLOW) to the existing overflow/rescan path.
  • Service & UI: Add systemd --user unit generation and lifecycle commands (systemctl --user) in service, xdg-open support for --open, and graceful non-macOS UI degradation in web/.

Verification #

  • cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test (36 unit + 2 E2E passed on macOS)
  • cd web && npm run typecheck && npm run lint && npm test && npm run build (10 vitest tests passed)
  • Note: Linux target compilation (x86_64-unknown-linux-musl / aarch64-unknown-linux-musl) was not executed locally as cross-compilation C toolchains (cargo-zigbuild / Linux runner) are not installed on this macOS host.
Commits 1

Add Linux support (XDG paths, statvfs+/proc/mounts, inotify ENOSPC fallback, systemd --user)
Sign up or Sign in to add to the discussion.