Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

Commit dc5e032

Browse files
committed
Add run step to build script
1 parent 8f86599 commit dc5e032

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.zig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ pub fn build(b: *Builder) void {
2222
native.addPackage(deps.pkgs.zigimg);
2323
native.addPackage(deps.pkgs.math);
2424
b.step("native", "Build native binary").dependOn(&native.step);
25+
26+
const native_run = native.run();
27+
// Start the program in the directory with the assets in it
28+
native_run.cwd = "static";
29+
30+
const native_run_step = b.step("run", "Run the native binary");
31+
native_run_step.dependOn(&native_run.step);
2532

2633
const wasm = b.addStaticLibrary("2021-7drl-web", "src/main.zig");
2734
wasm.setBuildMode(mode);

0 commit comments

Comments
 (0)