diff options
Diffstat (limited to 'build')
| -rw-r--r-- | build/core.zig | 6 | ||||
| -rw-r--r-- | build/tests.zig | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/build/core.zig b/build/core.zig index 32228ab2..f9cb450f 100644 --- a/build/core.zig +++ b/build/core.zig @@ -310,8 +310,10 @@ pub const Parts = struct { pdf: ?*std.Build.Module, term: *std.Build.Module, plain: *std.Build.Module, - /// The kinds' C ABI (abi/pardes_addon.h), translated. + /// The kinds' C ABI (abi/pardes_addon.h), translated, and what an addon + /// in Zig imports over it (abi/addon.zig: the core's `cSlice` too). kind: *std.Build.Module, + addon: *std.Build.Module, themes: *std.Build.Module, ts: TreeSitter, mvzr: *std.Build.Module, @@ -401,6 +403,7 @@ pub fn module(b: *std.Build, p: Parts, c: Core) Modules { if (c.terminal) x.addImport("term", p.term); x.addImport("plain", p.plain); x.addImport("pardes_addon", p.kind); + x.addImport("addon", p.addon); x.addImport("generated_themes", p.themes); x.addImport("tree-sitter", p.ts.mod); x.addImport("ts_queries", ts_queries); @@ -632,6 +635,7 @@ pub fn assemble(b: *std.Build, c: struct { .term = term_mod, .plain = plain_mod, .kind = kind_mod, + .addon = addon_mod, .themes = themes_mod, .ts = ts, .mvzr = mvzr_mod, diff --git a/build/tests.zig b/build/tests.zig index e0b33911..5e913501 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -162,6 +162,7 @@ pub fn add(b: *std.Build, c: struct { run_replicas.has_side_effects = true; b.step("replicas", "one authority and several replicas in process, each client typing over a delayed link: digests at quiescence, rollback rate and costs per RTT (-- [--seeds N] [--steps M] [--clients C] [--rtt 30,80,207])").dependOn(&run_replicas.step); for ([_]*std.Build.Module{ snake_mod, life_mod, liar_mod, c.parts.image }) |m| addon_test_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = m })).step); + if (c.pdf_addon) |lib| addon_test_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = lib.root_module })).step); // ...and the pdf addon's, which mupdf-check runs too (its script // opens docs/design.pdf, from the build root). const libs = [_]struct { ?*std.Build.Step.Compile, []const u8 }{ .{ fake_addon_lib.?, "addons/fake/fake" }, .{ snake_lib, "addons/snake/snake" }, .{ c.snake_shader_lib, "addons/snake_shader/snake_shader" }, .{ life_lib, "addons/life/life" }, .{ c.pdf_addon, "addons/pdf/pdf" } }; |
