Modernize macos fskit 9p versions#12
Draft
ericvh wants to merge 21 commits into
Draft
Conversation
Update build defaults for current Xcode SDK discovery, add mount-time negotiation for 9P2000/9P2000.u/9P2000.L, and prefer kmutil on modern macOS. Add initial FSKit-based (kext-less) rewrite scaffolding with docs. Made-with: Cursor
Factor version candidate ordering into a shared helper and add a small test runner wired to `make test`. Made-with: Cursor
Add separate workflows to build userland targets and run `make test` on macOS runners for every push and PR. Made-with: Cursor
Print and run the test binary without silencing the execution line so CI logs clearly show the test step running. Made-with: Cursor
Add a user-space test runner that round-trips key 9P messages and Dir stat encodings through convS2M/convM2S and convD2M/convM2D. Wire into `make test` and CI. Made-with: Cursor
Introduce a Mac9PCore Swift package with XCTest coverage for mount string parsing and version candidate ordering, and run it in CI. Parse the custom `9p://` scheme without Foundation.URL to avoid digit-leading scheme restrictions. Made-with: Cursor
Remove fskit-core/.build from the repository and ignore SwiftPM build outputs so FSKit core tests stay clean. Made-with: Cursor
Run FSKit core SwiftPM tests by default in CI and gate the kext/codec job behind workflow dispatch or a PR label. Expand the codec round-trip tests to cover all 9P message types implemented by Mac9P. Made-with: Cursor
Implement a user-space 9P client (version negotiation, attach, walk, open, read, stat, readdir, clunk) with a minimal wire codec and blocking TCP transport. Add a BSD-socket mock 9P server and an integration test that exercises a simple readonly file tree. Made-with: Cursor
Introduce NinePAsyncClient with a background reader loop that demultiplexes replies by tag into awaiting continuations, enabling safe concurrent RPCs over a single TCP connection. Add XCTest coverage that performs concurrent reads against the mock 9P server. Made-with: Cursor
Add an AI-generated Werner Herzog–style mirror of README.md and a CI guard that requires updating HERZOG.md whenever README.md changes. Made-with: Cursor
Update the FSKit glue layer to use the fskit-core 9P client configuration and connect+attach during mount. Add Xcode packaging/setup notes and refresh README/TODO (and HERZOG mirror) to reflect the FSKit-core test path. Made-with: Cursor
Add initial FSKit volume support for lookup, attribute fetch, directory enumeration (packer-based), and file reads by delegating to the async 9P client in fskit-core. Expose fid allocation in the core client and update README/TODO (and HERZOG mirror) to reflect readonly progress. Made-with: Cursor
Add fid pooling in the async 9P core client (releaseFid + free list) and introduce a per-inode fid table with reference counting in the FSKit volume. Items clunk and return fids to the pool only when the last reference is reclaimed. Made-with: Cursor
Track in-use fids in the async client, expose debug accounting for tests, and add long-running integration tests that allocate, walk, clunk, and release fids to confirm reuse and no leaks at completion. Made-with: Cursor
Implement per-directory enumeration snapshots with generation-encoded cookies to keep enumeration stable while still fetching a fresh view from the server on each new enumeration (cookie.initial). Return generation-based verifiers and request read-only mount options. Made-with: Cursor
Finalize the readonly FSKit volume by providing requestedMountOptions as a stored value and implementing volumeStatistics. Update README/TODO and the HERZOG mirror to reflect the completed readonly MVP behavior. Made-with: Cursor
Add an XcodeGen spec and minimal macOS app + FSKit extension templates wired to the local fskit-core Swift package and fskit sources, so the filesystem can be built and tested against real 9P servers. Made-with: Cursor
Add a repeatable script that generates and builds the FSKit Xcode project, prompts for enabling the extension, mounts a real 9P URL, runs basic readonly checks, and unmounts. Document usage in README and HERZOG mirror. Made-with: Cursor
Add a script to build/run diod as a real 9P server exporting a local directory and an XCTest that exercises the core client against MAC9P_E2E_URL. Add an optional GitHub Actions job to run these tests on workflow_dispatch. Made-with: Cursor
yrk-lab
reviewed
Apr 24, 2026
| ### From the Finder | ||
|
|
||
| *(Broken if the binary is not signed)* | ||
| In Finder: **Go** → **Connect to Server...** and enter: *9p://sources.cs.bell-labs.com*. |
There was a problem hiding this comment.
sources.cs.bell-labs.com is gone - use 9p.io
yrk-lab
reviewed
Apr 24, 2026
| FLAG_CHATTY9P = 1<<0, | ||
| FLAG_DSSTORE = 1<<1, | ||
| FLAG_DOTU = 1<<2, | ||
| FLAG_DOTL = 1<<3, |
There was a problem hiding this comment.
Changes to the kext would probably be better off as a separate branch/PR
yrk-lab
reviewed
Apr 24, 2026
|
|
||
| ```bash | ||
| mkdir -p /tmp/mac9p | ||
| mount -t mac9p "9p://sources.cs.bell-labs.com:564/?vers=9P2000" /tmp/mac9p |
Remove kext- and kext-userland-related changes from the branch to keep the FSKit-focused PR reviewable. Replace the example host `sources.cs.bell-labs.com` with `9p.io` across docs. Credit: Yaroslav Kolomiiets Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempting to see if AI can modernize this for me...