diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 14:27:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:53:45 -0300 |
| commit | 333cdea69956adda91f462980a18f5bac6548dda (patch) | |
| tree | 641e3226c4ce0192bbdab3ad167248f120d9ab8b /build.zig | |
| parent | 31706a1d1c13c26c69f67f107b72179019cbd255 (diff) | |
| download | pardes-333cdea69956adda91f462980a18f5bac6548dda.tar.gz pardes-333cdea69956adda91f462980a18f5bac6548dda.zip | |
kinds #27, life: addons/life/life.zig is a second shipped Zig addon, Conway's Life in a pane written clean-room against src/kinds/addon.zig and the header alone (steps ten generations a second while focused, space pauses, r reseeds, hjkl and x edit, the prefix the generation and alive count, the body the board, dump and load the board), with its script and golden under addon-test and its own zig tests; the module's timing test and the dogfood that found Kind.step's stale tick clock
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1621,10 +1621,12 @@ pub fn build(b: *std.Build) void { const addon_test_step = b.step("addon-test", "pardes --addon-test over the fake, snake and pdf addons, against addons/*/*.out, and the Zig addons' own tests"); const snake_mod = b.createModule(.{ .root_source_file = b.path("addons/snake/snake.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "addon", .module = addon_mod }} }); const snake_lib = b.addLibrary(.{ .name = "snake", .linkage = .dynamic, .root_module = snake_mod }); - for ([_]*std.Build.Module{ snake_mod, image_mod }) |m| addon_test_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = m })).step); + const life_mod = b.createModule(.{ .root_source_file = b.path("addons/life/life.zig"), .target = target, .optimize = optimize, .imports = &.{.{ .name = "addon", .module = addon_mod }} }); + const life_lib = b.addLibrary(.{ .name = "life", .linkage = .dynamic, .root_module = life_mod }); + for ([_]*std.Build.Module{ snake_mod, life_mod, image_mod }) |m| addon_test_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = m })).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" }, .{ pdf_addon, "addons/pdf/pdf" } }; + const libs = [_]struct { ?*std.Build.Step.Compile, []const u8 }{ .{ fake_addon_lib.?, "addons/fake/fake" }, .{ snake_lib, "addons/snake/snake" }, .{ life_lib, "addons/life/life" }, .{ pdf_addon, "addons/pdf/pdf" } }; for (libs) |t| if (t[0]) |lib| { const run_addon_test = b.addRunArtifact(exe); run_addon_test.setCwd(b.path(".")); |
