#Running multiple instances of the program with build.zig
1 messages · Page 1 of 1 (latest)
do you want to run an progam created with addExecutable multiple times?
const run_cmd = b.addRunArtifact(exe);
const run2_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
run2_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
run_step.dependOn(&run2_cmd.step);
Does run them concurrently though, or one after the other ?
I can think of of use cases where you might want zig build run to bring up multiple instances of a thing concurrently- like a server process, a client, and a message broker or something
How to “run in background” from build.zig in a portable way ?
yea was thinking this too. my program is a gui program so im thinking run2 won't be executed until run_cmd exits