aoc2025 @ 860942b3aa8cfdf1a9a2e6569b54d3bf5c24c666

 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 = "aoc2024",
 9        .root_module = b.createModule(.{
10            .root_source_file = b.path("src/main.zig"),
11            .target = target,
12            .link_libc = false,
13            .optimize = optimize,
14            .single_threaded = true,
15        }),
16    });
17
18    b.installArtifact(exe);
19
20    const run_step = b.step("run", "Run the app");
21
22    const run_cmd = b.addRunArtifact(exe);
23    run_step.dependOn(&run_cmd.step);
24
25    run_cmd.step.dependOn(b.getInstallStep());
26
27    if (b.args) |args| {
28        run_cmd.addArgs(args);
29    }
30
31    const exe_tests = b.addTest(.{
32        .root_module = exe.root_module,
33    });
34
35    const run_exe_tests = b.addRunArtifact(exe_tests);
36
37    const test_step = b.step("test", "Run tests");
38    test_step.dependOn(&run_exe_tests.step);
39
40}