const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); const xxd = b.dependency("xxd", .{ .target = target, .optimize = optimize }); const exe = b.addExecutable(.{ .name = "xxd", .root_module = b.createModule(.{ .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "xxd", .module = xxd.module("xxd") }, }, }), }); b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); run_cmd.step.dependOn(b.getInstallStep()); run_cmd.addPassthruArgs(); b.step("run", "Hex dump the file given as an argument").dependOn(&run_cmd.step); }