# cloud9 integration The published `cloud9` package owns the base 9P2000 wire format, client and server connections, and TCP/Unix/QUIC transports. `build.zig.zon` pins a commit from `git@git.sr.ht:~gbrls/cloud9`, so `zig build` fetches it into `zig-pkg/` like every other dependency; no sibling checkout is required. Re-pin with `zig fetch --save=cloud9 git+https://git.sr.ht/~gbrls/cloud9#`, and swap in `.cloud9 = .{ .path = "../cloud9" }` while editing both packages at once. The file-server engine (fids, jobs, parking, flush, hangup) is cloud9's `fs.Server`; the control tree in `src/ninep/` is its backend, using cloud9's `fs.Req`, `fs.Op`, `fs.Status`, `fs.E` and `fs.ReplyWith` (extended with the editor's reply payload locator). `src/9p.zig` names the editor's and the board's `fs.Options` and re-exports the wire names the transports use. Mounting, Unix namespace discovery and permissions, the editor event loop, connection limits, and exported tree policy remain here. The Unix and TCP listeners run on cloud9's `serve.Runner` (`std.Io`: an accept task per listener, a reader and a writer task per connection, four slots); its handler queues every backend request for the editor's thread, which answers them all in `Listener.tick` after each editor update, retries parked reads there, and has the runner ship the replies. `src/9p_quic.zig` selects the existing `pardes-9p` ALPN for cloud9's optional OpenSSL transport; QUIC still runs on the poll loop in `src/9p_io.zig`, since cloud9's QUIC adapter is nonblocking-descriptor based rather than `std.Io` based. The standalone protocol/GPIO tests import the same module. The separate `05-zig-p4` build also supplies cloud9 for the GPIO firmware entry. Run `zig build 9p-test` for the engine configurations and `zig build 9p-io-test -Dquic=true` for native transport/client integration. Run cloud9's `zig build test`, `transport-test`, `quic-test -Dquic=true`, `fuzz`, and `differential` steps for the shared implementation. See cloud9's `docs/validation.md` for recorded runs and known test-environment limits. Invalid framing now terminates a server connection. Cloud9 also checks reply counts and reserves tags until flush completion. Client metadata is slightly larger to track those reservations, and its bounds tests reflect that fixed cost.