summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-20 00:58:22 -0300
committerGabriel Schneider <[email protected]>2026-09-20 00:58:22 -0300
commit65209217b5b68f56bc0bd5bc6c4dce33911ded59 (patch)
treebe3848ef46b7a2ce1d0ad1a768b7a97d428481c4 /README.md
parent3e9f8805f293f622bb885cf849b5ce47dc062ad1 (diff)
downloadcloud9-65209217b5b68f56bc0bd5bc6c4dce33911ded59.tar.gz
cloud9-65209217b5b68f56bc0bd5bc6c4dce33911ded59.zip
Add the file-server engine: cloud9.fs.Server(Backend, Options)
The asynchronous 9P file-server engine from the Pardes editor moves into the library: fid table, walks, directory cursors, a job/slot model where backend replies arrive later by tag (status again = parked), Tflush cancellation and orphaned fids on hangup. Allocation-free, no OS calls, no std.Io; comptime Options (fid, slot, park data, name and user capacities) replace the editor's constants. Backend contract types (Req, Reply/ReplyWith, Op, Status, Attr, E, error strings) live here. 29 engine tests plus the client tests that sat beside it in Pardes. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 79d044f..4c4d24c 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,14 @@ answer Tversion with `negotiate()`. Answer other requests with `reply()`. The
backend implements its filesystem and fid lifecycle; cloud9 checks reply types,
tags, counts, negotiated frame sizes, and flush completion.
+`fs.Server(Backend, options)` is a file server on top of that session: it keeps
+the fids, permissions, directory cursors, flush and hangup, and turns each 9P
+request into backend operations (`fs.Req`: lookup, getattr, setattr, open,
+read, write, release, readdir) that the backend answers by tag with `fs.Reply`,
+at once or later; a read or write may park with `Status.again` and is retried.
+Table sizes are comptime `fs.Options`; nothing allocates. See
+[the engine's contract](docs/design.md#file-server-engine).
+
## Programs
Related programs live in `cloud9/<name>/`, one directory per program beside