summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-15 20:36:53 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit051fa32a31fab2980b5e8af3113befc83d7914b3 (patch)
tree1cfea0c1017f0ef170e977e4c5b6694adc8dc917
parent179863c0a7b011d5a4bd5e064f7d021d239aa96e (diff)
downloadpardes-051fa32a31fab2980b5e8af3113befc83d7914b3.tar.gz
pardes-051fa32a31fab2980b5e8af3113befc83d7914b3.zip
Fetch cloud9 from sourcehut, and correct the citations into the board toolchain
-rw-r--r--build.zig.zon11
-rw-r--r--docs/cloud9.md9
-rw-r--r--docs/design.typ4
-rw-r--r--src/esp32p4/app.zig4
-rw-r--r--src/esp32p4/input_rescue.zig13
5 files changed, 30 insertions, 11 deletions
diff --git a/build.zig.zon b/build.zig.zon
index 2ffe5d47..79c2a261 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -2,7 +2,16 @@
.name = .pardes,
.version = "0.0.3",
.dependencies = .{
- .cloud9 = .{ .path = "../cloud9" },
+ // 9P sessions and transports live in the published cloud9 package, so
+ // the manifest pins the build: `zig build` fetches this commit into
+ // zig-pkg/ like any other dependency. Push to
+ // `[email protected]:~gbrls/cloud9`; zig has no git+ssh support, so the
+ // read-only HTTPS URL is what a manifest can carry. Re-pin with
+ // `zig fetch --save=cloud9 git+https://git.sr.ht/~gbrls/cloud9#<commit>`.
+ .cloud9 = .{
+ .url = "git+https://git.sr.ht/~gbrls/cloud9#ae310a207534b33b7321dd2b9f423a73b1969159",
+ .hash = "cloud9-0.1.0-yt86qsv9AwAy7XqxowpkCFum_p_xfl4S74L8KIeVz4j9",
+ },
// ZLS as a LIBRARY, not a language server: src/lsp_zls.zig imports the
// `zls` module its build.zig publishes and calls the analyser in
// process — no zls binary, no JSON-RPC, no handshake.
diff --git a/docs/cloud9.md b/docs/cloud9.md
index db547afc..e18130ef 100644
--- a/docs/cloud9.md
+++ b/docs/cloud9.md
@@ -1,8 +1,11 @@
# cloud9 integration
-The sibling `../cloud9` package owns the base 9P2000 wire format, client and server
-connections, and TCP/Unix/QUIC transports. `build.zig.zon` uses the local package
-path so both checkouts can be developed together.
+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
+`[email protected]:~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#<commit>`, and swap in
+`.cloud9 = .{ .path = "../cloud9" }` while editing both packages at once.
`src/9p.zig` remains the adapter between cloud9 requests and Pardes filesystem
operations. Mounting, Unix namespace discovery and permissions, the editor event
diff --git a/docs/design.typ b/docs/design.typ
index f6e2e240..4c8956ba 100644
--- a/docs/design.typ
+++ b/docs/design.typ
@@ -1633,6 +1633,10 @@ zig-tree-sitter with 29 grammars for 28 languages (markdown takes two, block and
inline) — all pinned through `zig fetch` and wired in `build.zig`. The board's
`05-zig-p4` firmware toolchain is a separate sibling checkout.
+The 9P library is the one pinned dependency that is not third-party: `cloud9`
+lives at `git.sr.ht/~gbrls/cloud9`, pushed as `[email protected]:~gbrls/cloud9` and
+fetched from that commit's HTTPS URL, since zig has no `git+ssh` support.
+
Generated during the build: `highlights.scm` into an options module; the vendored
helix and zed theme sources into the generated half of the theme ring;
working-tree `.zig` sources into the web shell's read-only archive; and eight
diff --git a/src/esp32p4/app.zig b/src/esp32p4/app.zig
index ae5679f3..4ee131ec 100644
--- a/src/esp32p4/app.zig
+++ b/src/esp32p4/app.zig
@@ -35,7 +35,7 @@
//! builds, it is what every measurement in that repository's `experiments/` was taken through, and
//! it is the firmware build path. Its externs link against that object file.
//! The reasons the seam is a file at all - a nested `build.zig.zon` dependency broke every build in
-//! the toolchain repository - are recorded in `src/esp32p4.zig:8-15` and `05-zig-p4/build.zig:238-260`.
+//! the toolchain repository - are recorded in `src/esp32p4.zig:8-15` and `05-zig-p4/build.zig:252-272`.
//!
//! Who owns which symbol: `src/esp32p4.zig` exports all eight `pardes_esp32p4_*` functions and nothing else.
//! This file exports `_start`, `zig_main`, `trapEntry` and `trapReport`. `esp_app_desc` belongs to
@@ -52,7 +52,7 @@
//! ## Where the memory is
//!
//! Measured on this die by the toolchain's `examples/memprobe.zig`, not read off a datasheet, and
-//! written down once in the generated linker script (`05-zig-p4/build.zig:1572,1579,1584-1585`):
+//! written down once in the generated linker script (`05-zig-p4/build.zig:1569,1576,1581-1582`):
//!
//! 0x4FF00000..0x4FF3F000 252 KiB `l2mem`: .data/.bss/.stack are linked into this
//! 0x4FF3F000..0x4FF40000 4 KiB mask ROM .data/.bss - untouchable, ets_printf needs it
diff --git a/src/esp32p4/input_rescue.zig b/src/esp32p4/input_rescue.zig
index 3f1c0268..ba6974d2 100644
--- a/src/esp32p4/input_rescue.zig
+++ b/src/esp32p4/input_rescue.zig
@@ -31,11 +31,14 @@
//! same source compile for riscv32-freestanding and for the host unchanged.
//!
//! ONE COPY, TWO BUILDS. This file is the only copy; the toolchain repository's is gone. Its build
-//! reads this tree across a sibling-relative seam, and names this path twice: once as the
-//! `input_rescue` module of `-Dpardes`'s application (`05-zig-p4/build.zig:230-231`, whose root is
-//! `../02-pardes-code/src/esp32p4/app.zig` by the `-Dapp` default at `:168-169`) and once as the
-//! same-named module of `zig build selftest`'s on-die root (`:437-438`). Both spell
-//! `../02-pardes-code/src/esp32p4/input_rescue.zig`, so there is nothing to keep in step.
+//! reads this tree across a sibling-relative seam in exactly one place: `zig build selftest` hands
+//! this path over as the `input_rescue` module of its on-die root (`05-zig-p4/build.zig:434-435`,
+//! the module at `:453`). The editor's own application root needs no such wiring - `app.zig` reads
+//! the policy through the `uart.zig` beside it, which imports this file as its sibling - and the
+//! toolchain deliberately registers no module for it, because zig hashes every registered module's
+//! root source on every compile, so registering one that a root does not use breaks every build in
+//! a checkout without this tree. `-Dapp` still defaults under `-Dpardes` to
+//! `../02-pardes-code/src/esp32p4/app.zig` (`:168-169`).
//!
//! Host checks run under `zig build unit-test` here. In `../05-zig-p4`,
//! `zig build selftest` flashes and runs the on-die checks against UART0.