tools

various tools I have been using throughout the years
Log | Files | Refs | README | LICENSE

build.zig (692B)


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