diff options
Diffstat (limited to 'build/library.zig')
| -rw-r--r-- | build/library.zig | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/build/library.zig b/build/library.zig index dcbb8938..7bcd6c5c 100644 --- a/build/library.zig +++ b/build/library.zig @@ -22,25 +22,14 @@ pub fn build(b: *std.Build) void { .root_source_file = b.path("src/lib_syntax.zig"), .link_libc = true, }); - mod.addOptions("pardes_config", core.shellOptions(b, .{ - .tree_sitter_grammars = tree_sitter_grammars, - .tracy = false, - .workspace_tag = null, - .prebuilt_shaders = false, - .embed_sources = false, - .commit = null, - .change = null, - .built = null, - }, .tui)); + // A library's options: its grammars, nothing stamped, no window. + const cfg: core.ShellConfig = .{ .tree_sitter_grammars = tree_sitter_grammars }; + mod.addOptions("pardes_config", core.shellOptions(b, cfg, .tui)); const ts = core.treeSitter(b, io, target, if (optimize == .debug) .fast else optimize, tree_sitter_grammars); const themes = core.generatedThemes(b, io, target, optimize); - core.wireCore(mod, .{ - .themes = themes, - .tree_sitter = ts.mod, - .ts_libs = ts.libs.items, - .ts_queries = ts.queries, - .c_heap = b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/c_heap.zig") }), - }); + mod.addImport("generated_themes", themes); + ts.wire(mod); + mod.addImport("c_heap", b.createModule(.{ .target = target, .optimize = optimize, .root_source_file = b.path("src/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. @@ -56,14 +45,5 @@ pub fn build(b: *std.Build) void { .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, .{ - .tree_sitter_grammars = tree_sitter_grammars, - .tracy = false, - .workspace_tag = null, - .prebuilt_shaders = false, - .embed_sources = false, - .commit = null, - .change = null, - .built = null, - }, .{ .themes = themes, .tree_sitter = ts.mod, .ts_libs = ts.libs.items, .ts_queries = ts.queries, .uucode = uucode, .mvzr = mvzr, .vaxis = vaxis }); + _ = core.editorModule(b, "pardes-editor", target, optimize, cfg, .{ .themes = themes, .ts = ts, .uucode = uucode, .mvzr = mvzr, .vaxis = vaxis }); } |
