From 1fc7d47ebddab3608454fbe44688132f8fb64398 Mon Sep 17 00:00:00 2001 From: iacore Date: Mon, 18 Mar 2024 20:06:35 +0000 Subject: [PATCH] zig: allow 'zig build run' --- cli/assets/templates/zig/build.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/assets/templates/zig/build.zig b/cli/assets/templates/zig/build.zig index 6ea20d97..432bc668 100644 --- a/cli/assets/templates/zig/build.zig +++ b/cli/assets/templates/zig/build.zig @@ -19,4 +19,10 @@ pub fn build(b: *std.Build) !void { exe.stack_size = 14752; b.installArtifact(exe); + + const run_exe = b.addSystemCommand(&.{ "w4", "run-native" }); + run_exe.addArtifactArg(exe); + + const step_run = b.step("run", "compile and run the cart"); + step_run.dependOn(&run_exe.step); }