feat(onset): lazy workspaces on macOS, over NFS on localhost
Radin committed
- Author
- Radin · radin@coline.appOct 31, 2026 at 23:04
- Committer
- Radin · radin@coline.appOct 31, 2026 at 23:56
- Parents
- 6da33b252db5
feat(onset): lazy workspaces on macOS, over NFS on localhost `on get <project> <folder> --lazy` and `on mount [folder] [--stop]` now work on macOS as on Linux: every file shows at once (folders and sizes first), each file comes from the host the first time it's read, writes go to the workspace's backing (copy-up), and saves, status, land and sync work as in any workspace. Any `on` command in the folder, or `on mount`, brings the mount back after a restart. No macFUSE, no FSKit, no root: `on mount --serve` runs an NFSv3 server on 127.0.0.1 (nfsserve) and mounts it with macOS's own /sbin/mount_nfs (vers=3,tcp,port=P,mountport=P,soft,intr,locallocks,noquota,nobrowse, rsize/wsize=1 MiB,actimeo=1); `on mount --stop` runs umount. - The overlay (tree + backing, gone paths, inodes, copy-up, rename) moves out of the FUSE module into lazy/overlay.rs; FUSE (lazy/fuse.rs) and NFS (lazy/nfs.rs) both serve it. Linux behaves as before. - Only the mounting user (and root) gets in, as with FUSE: the mount request is answered once, for an export path with a secret in it; file handles start with another secret; and the port macOS mounts is a relay that refuses calls made as other users. ACCESS replies say a file with no execute bit can't run. - macOS's own files (._*, .DS_Store, .nfs.*) are kept but left out of listings unless the tree has them, so saves never see them. - The serving process holds mount.lock in the backing; a mount whose process died is force-unmounted before the next one starts. - A file is fetched before the overlay is locked, so a big fetch doesn't hold up other calls. - If mount_nfs fails, the error says why and that `on get` without --lazy works. - New dependencies (nfsserve, tokio, async-trait) are macOS-only. - tests/hosted.sh runs its lazy section on macOS too (when /sbin/mount_nfs is there), and checks the folder is a mount. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 files changed+1,860−762