summaryrefslogtreecommitdiff
path: root/build/library.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 06:33:52 -0300
committerGabriel Schneider <[email protected]>2026-11-20 06:33:53 -0300
commitffe05cceb897b3ae6a6d36491f9318a8aa3426e7 (patch)
tree352414579559060b3e8486af34e29d49fd5df781 /build/library.zig
parent5b7124d10f9b2db8d1c5e99eacb9b6d2fffff0cc (diff)
parenta403340ec5c90238b136ca85fc64d65809b29a65 (diff)
downloadpardes-ffe05cceb897b3ae6a6d36491f9318a8aa3426e7.tar.gz
pardes-ffe05cceb897b3ae6a6d36491f9318a8aa3426e7.zip
integration: the build's second pass on the handle and the devices once: pardes-build-pass2 (pardes-isolate and the tree-sitter=disabled tier deleted; one option, grammars = none | minimal | full; build.zig with the consumer's lines as its head comment; test/lib -> test/consumer; the manual's library section) and pardes-merge31, merged without a textual conflict; one line follows a deletion: dev/file_watch.zig's end-to-end test of a session's watches (written since on the base) guarded on fs.platform_has_fs, which the first of these changes deleted: the guard reads as the file's other tests' (comptime !supported); tui core-test 857/1008 (151 skipped), shell-test 1048/1051, the window builds; the coordinator's gate in the ledger (reorg/merge32)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'build/library.zig')
-rw-r--r--build/library.zig49
1 files changed, 0 insertions, 49 deletions
diff --git a/build/library.zig b/build/library.zig
deleted file mode 100644
index 8a23debc..00000000
--- a/build/library.zig
+++ /dev/null
@@ -1,49 +0,0 @@
-const std = @import("std");
-const TreeSitterGrammars = @import("../build.zig").TreeSitterGrammars;
-const core = @import("core.zig");
-const patches = @import("patches.zig");
-
-/// pardes as a library, all a package that depends on it is given: the
-/// `pardes-syntax` module (core/lib_syntax.zig), the grammars, highlighting
-/// and themes for a program that draws source text itself. It takes
-/// tree-sitter and the grammars of its `tree-sitter` option and no other
-/// dependency, so nothing else is fetched (build.zig.zon). test/lib is such
-/// a package, which `lib-test` builds.
-pub fn build(b: *std.Build) void {
- const target = b.standardTargetOptions(.{});
- const optimize = b.standardOptimizeOption(.{});
- const tree_sitter_grammars = b.option(TreeSitterGrammars, "tree-sitter", "tree-sitter grammar set: disabled, zig, minimal (c/c++/zig), full") orelse .full;
- var threaded: std.Io.Threaded = .init(b.allocator, .{});
- defer threaded.deinit();
- const io = threaded.io();
- const mod = b.addModule("pardes-syntax", .{
- .target = target,
- .optimize = optimize,
- .root_source_file = b.path("core/lib_syntax.zig"),
- .link_libc = true,
- });
- // A library's options: its grammars, nothing stamped, no window.
- const cfg: core.ShellConfig = .{ .tree_sitter_grammars = tree_sitter_grammars };
- mod.addOptions("pardes_options", core.options(b, cfg, .{ .root = "core/lib_syntax.zig", .platform = .tui, .terminal = false }, false));
- const ts = core.treeSitter(b, io, target, if (optimize == .debug) .fast else optimize, tree_sitter_grammars);
- const themes = core.generatedThemes(b, io, target, optimize);
- mod.addImport("generated_themes", themes);
- ts.wire(mod);
- mod.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("core/c_heap.zig") }));
- // The editor, `pardes-editor`, to a package that asks for it: uucode,
- // mvzr and vaxis (with what its build names) are fetched then and only
- // then. Of vaxis it takes the grapheme width, which uucode alone feeds.
- if (!(b.option(bool, "editor", "also export `pardes-editor`, the text pane as a library (fetches uucode, mvzr and vaxis)") orelse false)) return;
- const uucode = core.uucodeModule(b, target, optimize) orelse return;
- const mvzr = patches.mvzr(b, patches.tool(b), b.dependencyLazy("mvzr", .{ .target = target, .optimize = optimize }) catch return, target, optimize);
- const vaxis_dep = b.dependencyLazy("vaxis", .{ .target = target, .optimize = optimize, .external_uucode = true }) catch return;
- const width = b.addWriteFiles();
- _ = width.addCopyFile(vaxis_dep.path("src/gwidth.zig"), "gwidth.zig");
- const vaxis = b.createModule(.{
- .target = target,
- .optimize = optimize,
- .root_source_file = width.add("vaxis.zig", "pub const gwidth = @import(\"gwidth.zig\");\n"),
- .imports = &.{.{ .name = "uucode", .module = uucode }},
- });
- _ = core.editorModule(b, "pardes-editor", target, optimize, cfg, .{ .themes = themes, .ts = ts, .uucode = uucode, .mvzr = mvzr, .vaxis = vaxis });
-}