summaryrefslogtreecommitdiff
path: root/build.zig.zon
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 11:07:09 -0300
committerGabriel Schneider <[email protected]>2026-11-10 11:25:35 -0300
commit6b3df3071d16153bd554462c4f54ebb88f3ed50e (patch)
tree5428c2d4d6679fe0c34c0496cd58f94fad1b7486 /build.zig.zon
parenta953f560f648e91dda8dd3a8dafe60a7f75739d0 (diff)
downloadpardes-6b3df3071d16153bd554462c4f54ebb88f3ed50e.tar.gz
pardes-6b3df3071d16153bd554462c4f54ebb88f3ed50e.zip
lib: pardes's syntax is a library, as ghostty-vt is ghostty's: a package that depends on pardes is given build.zig's `library` and nothing of the editor, one module, `pardes-syntax` (src/lib_syntax.zig), naming what a program that draws source text itself takes, the editor's own code under its own names (highlightFileRange and analyzeSource for a Syn a byte and the sticky headers' declarations, parse and walkNodes over the tree-sitter bindings, theme, page, ink and synInk for a named theme's colours, the line arithmetic, pathFor for a language's name); every dependency but tree-sitter's runtime is lazy in the manifest, so such a package fetches the runtime and the grammars of its tree-sitter set alone, and pardes's own build asks for all it is missing in one round before its first b.dependency; build.zig's tree-sitter and theme-generator blocks become treeSitter and generatedThemes for both to call, a grammar not yet fetched asked for and left out of that round, and the scanners' -include of src/tree_sitter_heap.h is spelled from the root package's directory, where the compiler runs (pardes's own flags are as they were); File.synStyle's switch moves to colors.synInk, so the editor and the library colour a class from one place; test/lib is such a package, depending on pardes by path: it colours, outlines and walks a C and a Zig source in orchard's colours under the testing allocator, and `zig build lib-test`, which unit-test runs, is its own `zig build test` over this checkout's zig-pkg; ts_markdown is pinned by the commit its hash is of (a0a00f81): its split_parser branch moved to v0.5.4 and a fresh fetch no longer matched; building.typ and the changelog say so; syntax snapshots unchanged
Diffstat (limited to 'build.zig.zon')
-rw-r--r--build.zig.zon46
1 files changed, 45 insertions, 1 deletions
diff --git a/build.zig.zon b/build.zig.zon
index 23efe9d0..360adbd9 100644
--- a/build.zig.zon
+++ b/build.zig.zon
@@ -2,6 +2,11 @@
.name = .pardes,
.version = "0.24.0",
.dependencies = .{
+ // Every dependency but tree_sitter is lazy: a package that depends
+ // on pardes for its library (build.zig's `library`) fetches
+ // tree-sitter and the grammars it asks for, and none of the rest.
+ // pardes's own build asks for what it is missing in one round.
+
// 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
@@ -11,6 +16,7 @@
.cloud9 = .{
.url = "git+https://git.sr.ht/~gbrls/cloud9#0702e33bcfadf0abd9ccbaa8b681a19a84c332fe",
.hash = "cloud9-0.1.0-yt86qkExHgCRI7_eJsztRECamioWguBj2mTFsJ5N-AOn",
+ .lazy = true,
},
// Pinned to the exact libvaxis commit ghostty is built against, so it
// is compatible with ghostty's uucode configuration (the one we share
@@ -18,10 +24,12 @@
.vaxis = .{
.url = "git+https://github.com/rockorager/libvaxis.git#6fd944a27fb3d6f596e981076381a3131f2448b4",
.hash = "vaxis-0.6.0-BWNV_MafDAAEzkVUvrW9NFUqnnMUoeHqrs2mecnD6D7w",
+ .lazy = true,
},
.ghostty = .{
.url = "git+https://github.com/ghostty-org/ghostty.git#83fb95624b0439ee660c2679b43b38c8b63769cd",
.hash = "ghostty-1.4.0-5UdBC-qohwWqLS0BImOz05t4hVyTwbaKslyTPvKYvAtE",
+ .lazy = true,
},
// Same uucode commit ghostty and vaxis both depend on. We build it
// ourselves (with uucode_config.zig) so ghostty-vt and vaxis can share
@@ -29,12 +37,14 @@
.uucode = .{
.url = "git+https://github.com/jacobsandlund/uucode#ea62149739404a73c202b48a33bf6dd2af4bd9b0",
.hash = "uucode-0.2.0-ZZjBPoGFVgCiflJNFc6Io8xzC67B6PA5bUkk4LT0kCxg",
+ .lazy = true,
},
// Pivok7's fork: zig-gamedev/zstbi PR #16, "Upgrade to zig 0.17.0"
// (two lines of build.zig). Back to upstream once it is merged.
.zstbi = .{
.url = "git+https://github.com/Pivok7/zstbi#bc96f28d341f9c7fb9cbc5dc65aa4c5cf0c8f007",
.hash = "zstbi-0.11.0-dev-L0Ea_3GWBwCpNHVwGU4MPR_oDd0FoQOYNrGodwvJ6Z45",
+ .lazy = true,
},
// SDL3 (castholm/SDL zig bindings, its release-3.4.x branch for Zig
// 0.17; david-vanderson's fork, pinned before, has no 0.17 build) — only
@@ -58,118 +68,150 @@
.ts_rust = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-rust#77a3747266f4d621d0757825e6b11edcbf991ca5",
.hash = "N-V-__8AAHJYbgAipcanYj2A6rnj9wtGzjGzANkrOsqiFAxm",
+ .lazy = true,
},
.ts_c = .{
.url = "git+https://github.com/pierrelgol/tree-sitter-c#67949e4c8dc630c18a522919f2bde2e025a0d025",
.hash = "tree_sitter_c-0.24.2-y5boS-htQACe3pz6jHq4tpS8dB6WIo4-zk_ct7lAjvQT",
+ .lazy = true,
},
.ts_typst = .{
.url = "git+https://github.com/uben0/tree-sitter-typst#13863ddcbaa7b68ee6221cea2e3143415e64aea4",
.hash = "N-V-__8AANAJVQBOabRzU-zDAdM20_2B2W2qk3-6Gvm1p1ZS",
+ .lazy = true,
},
.ts_zig = .{
.url = "git+https://github.com/maxxnino/tree-sitter-zig#a80a6e9be81b33b182ce6305ae4ea28e29211bd5",
.hash = "N-V-__8AADLAWgBszUZPv5YTGyO5ZNyxNcuuR8MB3mIMJrZf",
+ .lazy = true,
},
.ts_python = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-python#26855eabccb19c6abf499fbc5b8dc7cc9ab8bc64",
.hash = "N-V-__8AAOiqPgC9tH5tYSAYNsMWLoPiSxcmkHvIhMnezomx",
+ .lazy = true,
},
.ts_javascript = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-javascript#58404d8cf191d69f2674a8fd507bd5776f46cb11",
.hash = "N-V-__8AANlfOQDpOAP-6YMQeJ2nQetX1OpUshQr903bnIHU",
+ .lazy = true,
},
.ts_go = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-go#2346a3ab1bb3857b48b29d779a1ef9799a248cd7",
.hash = "N-V-__8AAM9cIgDttbrvbwLWFB0JPplu_2KtCWu7__79EjIT",
+ .lazy = true,
},
.ts_json = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-json#001c28d7a29832b06b0e831ec77845553c89b56d",
.hash = "N-V-__8AAHNaAgD6kjK3HX6lAf89chPqS5zIm0tLpvBQLOtX",
+ .lazy = true,
},
.ts_html = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-html#73a3947324f6efddf9e17c0ea58d454843590cc0",
.hash = "N-V-__8AAEmOAwDdgRRlet5t1CEdpX1YMCbfhFiIbj_vsBH9",
+ .lazy = true,
},
.ts_css = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-css#dda5cfc5722c429eaba1c910ca32c2c0c5bb1a3f",
.hash = "N-V-__8AAKwvEACP3YMpMDoRyyZPOdDN1n-zdTZRWTc3uufz",
+ .lazy = true,
},
.ts_bash = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-bash#a06c2e4415e9bc0346c6b86d401879ffb44058f7",
.hash = "N-V-__8AANjenwCy_cXlIbU8nqBzGxMlEHVokLZJYrmIXtoz",
+ .lazy = true,
},
.ts_cpp = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-cpp#8b5b49eb196bec7040441bee33b2c9a4838d6967",
.hash = "N-V-__8AAMePmwGeojPhBaBC10aGwaQIOU4vg1H17IWakWs-",
+ .lazy = true,
},
.ts_java = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-java#e10607b45ff745f5f876bfa3e94fbcc6b44bdc11",
.hash = "N-V-__8AAGrhLgBgxGFnDv-tHxMarGDRT4VTig1IIX1rcBdc",
+ .lazy = true,
},
.ts_c_sharp = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-c-sharp#af29416d729b7a6603101b513604392d8f675e3b",
.hash = "N-V-__8AALpc-AFDJNotrh7YgiXce1oXC9ub9SuD-Enwt7rN",
+ .lazy = true,
},
.ts_php = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-php#38216983c07bf9e1b56e16acde53b25adaeab61c",
.hash = "N-V-__8AABgQ6QCTufRtmuKAuAvX1ty8ZouX1jZ17wGFcx6I",
+ .lazy = true,
},
.ts_ruby = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-ruby#ad907a69da0c8a4f7a943a7fe012712208da6dee",
.hash = "N-V-__8AAB_S8QDTw_FIWZfx_eKtcAvrPJuTP12QEMVN2LDS",
+ .lazy = true,
},
.ts_scala = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-scala#4d081d98670ff6e98ca42c085294fc75eec15e1d",
.hash = "N-V-__8AAJlN0gFxPUfpXqmIgQLEXkmXsrvo3caVWINVJdTb",
+ .lazy = true,
},
.ts_kotlin = .{
.url = "git+https://github.com/fwcd/tree-sitter-kotlin#c8ac3d2627240160b999a2c100de3babbdb8f419",
.hash = "N-V-__8AAKSpGALvICLMOMcl4S_ypQBib_euVyf_B_9DP08A",
+ .lazy = true,
},
.ts_haskell = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-haskell#0975ef72fc3c47b530309ca93937d7d143523628",
.hash = "N-V-__8AALWgQgGf5l7eg-Dwi24SJszCffzN4_mWEtv3e3oI",
+ .lazy = true,
},
.ts_ocaml = .{
.url = "git+https://github.com/tree-sitter/tree-sitter-ocaml#527d62ef0f24ce0d97fbedf004921d75d0a7e086",
.hash = "N-V-__8AAGaGxwK7r2vy00a8b4MDEm0eudoNzkzu1WM01h7Q",
+ .lazy = true,
},
.ts_erlang = .{
.url = "git+https://github.com/WhatsApp/tree-sitter-erlang#836aa2b6c3af2c7cef3f84049b0ed6d44485a870",
.hash = "N-V-__8AAAVWKgC44vrL1kvl8SLUnqNkFU4guLAaXK73RmYK",
+ .lazy = true,
},
.ts_elixir = .{
.url = "git+https://github.com/elixir-lang/tree-sitter-elixir#7937d3b4d65fa574163cfa59394515d3c1cf16f4",
.hash = "N-V-__8AAHFBzAB5XFJyJvMulqqafphEQOoizic5m6WFfy6j",
+ .lazy = true,
},
.ts_clojure = .{
.url = "git+https://github.com/sogaiu/tree-sitter-clojure#e43eff80d17cf34852dcd92ca5e6986d23a7040f",
.hash = "N-V-__8AAAnoDwDKLr63cSQ_IHEojhLIanmbGIkrZNQSUM5_",
+ .lazy = true,
},
.ts_fortran = .{
.url = "git+https://github.com/stadelmanma/tree-sitter-fortran#7edacd2b21aa80057d9725384a1304a1c758e0f8",
.hash = "N-V-__8AAJ0zQgKKtzb0-wDQjY1pewE7RXmpAHVsKuwLT0e3",
+ .lazy = true,
},
.ts_ada = .{
.url = "git+https://github.com/briot/tree-sitter-ada#6b58259a08b1a22ba0247a7ce30be384db618da6",
.hash = "N-V-__8AAHNJMgAgTa051RgoAs48ohsOgCTsM34tTxoj80CE",
+ .lazy = true,
},
.ts_pascal = .{
.url = "git+https://github.com/Isopod/tree-sitter-pascal#042119eca2e18a60e56317fb06ee3ba5c32cb447",
.hash = "N-V-__8AAMmnUgA4hx9Tv_Vl5uDuzQ8r4gSH6J1CuwlZ5YOm",
+ .lazy = true,
},
.ts_powershell = .{
.url = "git+https://github.com/airbus-cert/tree-sitter-powershell#d398441825243b00e317e87e1829b9d6a3e54ce0",
.hash = "N-V-__8AAKzlUACji5nMCtCC_dgDtF1rEg1qoduDm3MT5B5H",
+ .lazy = true,
},
+ // The split_parser branch's commit this hash is of: the branch has
+ // moved since (v0.5.4), and a fresh fetch of its name no longer
+ // matches.
.ts_markdown = .{
- .url = "git+https://github.com/tree-sitter-grammars/tree-sitter-markdown#split_parser",
+ .url = "git+https://github.com/tree-sitter-grammars/tree-sitter-markdown#a0a00f817d02412bd92c54d316f164d827b57b5c",
.hash = "N-V-__8AAPRhUwBHS53YVU2fqpXuZ8VMvL_vIKp2AQo4Ja7V",
+ .lazy = true,
},
.mvzr = .{
.url = "git+https://github.com/mnemnion/mvzr#3efcfe339bd32e122c36b8f1db25b237f93a7ec2",
.hash = "mvzr-0.3.9-ZSOky6t2AQCA7efmm5EYbPb5sOdbXa4EFsUgYbQ6hZv9",
+ .lazy = true,
},
// MuPDF for the pdf addon (mupdf.zig). Lazy: -Dpdf fetches it, once.
.mupdf = .{
@@ -200,10 +242,12 @@
.zstd = .{
.url = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz",
.hash = "N-V-__8AAPZ7fwBg4JoCzM_0o2A8wxH2hsUUeiU1iuZv53L5",
+ .lazy = true,
},
.xitdb = .{
.url = "https://github.com/xit-vcs/xitdb/archive/6b93af1af3a260399fa0a0b1b268ded2cbf5eec5.tar.gz",
.hash = "xitdb-0.0.0-EEFkxhwmBwDz1N8H9oHhVhd1Al5YZp8iDhaMLm2_79pS",
+ .lazy = true,
},
},
.minimum_zig_version = "0.17.0",