1const std = @import("std");
2
3pub fn build(b: *std.Build) void {
4 const target = b.standardTargetOptions(.{});
5 const optimize = b.standardOptimizeOption(.{});
6 const exe = b.addExecutable(.{
7 .name = "rosetta-collatz",
8 .root_module = b.createModule(.{
9 .root_source_file = b.path("src/main.zig"),
10 .target = target,
11 .optimize = optimize,
12 }),
13 });
14
15 b.installArtifact(exe);
16 const run_step = b.step("run", "Run the app");
17 const run_cmd = b.addRunArtifact(exe);
18 run_step.dependOn(&run_cmd.step);
19 run_cmd.step.dependOn(b.getInstallStep());
20 if (b.args) |args| {
21 run_cmd.addArgs(args);
22 }
23}