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

Add Windows support #10

Closed zip.mu.social
Closed opened by zip.mu.social

Add native Windows support for getael while preserving the strictly read-only invariant and single-binary architecture.

Scope #

  1. Platform directory paths: Replace macOS-hardcoded ~/Library/Caches/getael, ~/.config/getael, and ~/Library/Logs/getael with standard Windows locations (e.g. %LOCALAPPDATA%\getael\cache, %APPDATA%\getael, %LOCALAPPDATA%\getael\logs via directories or cfg(windows)).
  2. Scanner metadata: Abstract std::os::unix::fs::MetadataExt usage (blocks, dev, ino, nlink, ctime) behind a platform module:
    • Allocated on-disk size via GetCompressedFileSizeW (or cluster-aligned fallback).
    • Hardlink deduplication via Windows file index + volume serial number.
  3. Filesystem watcher: Gate notify's macos_fsevent feature to cfg(target_os = "macos"). notify::RecommendedWatcher uses ReadDirectoryChangesW (bWatchSubtree = TRUE, unprivileged, O(1) handle). Ensure buffer overflow (ERROR_NOTIFY_ENUM_DIR / Flag::Rescan) maps cleanly to getael's existing overflow/rescan path.
  4. Volume & snapshot telemetry: Replace APFS (diskutil, statfs, tmutil) with Windows volume capacity (GetDiskFreeSpaceExW). Treat local snapshot telemetry as unavailable/unsupported (VSS requires Administrator privileges) and ensure the HTTP API and UI degrade cleanly without macOS-specific copy.
  5. Single-file build: Verify x86_64-pc-windows-msvc builds cleanly as a standalone .exe (-C target-feature=+crt-static, rusqlite bundled, rust-embed).

Acceptance Criteria #

  • cargo check / cargo test pass on Windows (x86_64-pc-windows-msvc).
  • Server starts unprivileged, scans %USERPROFILE%, serves the embedded web UI on 127.0.0.1:6174, and updates live on filesystem changes.
  • Strictly read-only toward user files.
Sign up or Sign in to add to the discussion.