1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const target = b.standardTargetOptions(.{});
5 const optimize = b.standardOptimizeOption(.{});
6
7 const exe = b.addExecutable(.{
8 .name = "aoc2025",
9 .root_module = b.createModule(.{
10 .root_source_file = b.path("src/main.zig"),
11 .target = target,
12 .optimize = optimize,
13 }),
14 });
15
16 b.installArtifact(exe);
17
18 const run_step = b.step("run", "Run the app");
19
20 const run_cmd = b.addRunArtifact(exe);
21 run_step.dependOn(&run_cmd.step);
22
23 run_cmd.step.dependOn(b.getInstallStep());
24
25 if (b.args) |args| {
26 run_cmd.addArgs(args);
27 }
28
29 const exe_tests = b.addTest(.{
30 .root_module = exe.root_module,
31 });
32
33 const run_exe_tests = b.addRunArtifact(exe_tests);
34
35 const test_step = b.step("test", "Run tests");
36 test_step.dependOn(&run_exe_tests.step);
37}