1
0
Fork
You've already forked zig-run-system
0
No description
  • Zig 100%
Find a file
2026年01月11日 13:33:18 +03:00
images Support devtmpfs 2025年12月04日 12:49:17 +03:00
src Do not use Child.run(...), We want active stdio. + mounted /dev 2025年12月04日 12:49:17 +03:00
.gitignore Initial commit 2025年12月04日 12:49:17 +03:00
build.zig Update to zig 0.15.2 2026年01月11日 13:33:18 +03:00
build.zig.zon Mount self, foreign and stdlib source directories via 9p protocol 2025年12月04日 12:49:17 +03:00
cpio.zig Update to zig 0.15.2 2026年01月11日 13:33:18 +03:00
LICENSE Initial commit 2025年12月04日 12:49:17 +03:00
README.md Add README.md 2026年01月06日 01:10:33 +03:00

Like addRunArtifact but use qemu-system-* instead of qemu-* or qemu-user, the result of that better support most syscalls unlike qemu-user Note: not all syscalls are supported. You can request one by editing images/.config.arch and compile it(:, or I might create CI action to do it idk. Feel free to add one(:

Example usage:

if(cli.rootModuleTarget().cpu.arch==b.graph.host.result.cpu.archandcli.rootModuleTarget().os.tag==b.graph.host.result.os.tag){construn_cmd=b.addRunArtifact(cli);run_cmd.step.dependOn(b.getInstallStep());if(b.args)|args|{run_cmd.addArgs(args);}construn_step=b.step("run","Run the app");run_step.dependOn(&run_cmd.step);}else{varargv=std.ArrayList([]constu8).init(b.allocator);argv.append("./zig-out/bin/theNameOfCli")catchunreachable;if(b.args)|args|{argv.appendSlice(args)catchunreachable;}construn_cmd=@import("zig_run_system").addRunSystem(b,target,argv.items);run_cmd.step.dependOn(b.getInstallStep());construn_step=b.step("run","Run the app");run_step.dependOn(&run_cmd.step);}