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