Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

addSystemCommand

Creates a step that executes a process on the host system.

argv is one or more command line arguments passed to the executed process. The first element is the name of the executable to run. More command line arguments can be added with methods of Step.Run, such as:

This function introduces a system dependency, compromising reproducibility and making it more difficult to set up one's computer in order to build the project from source.

See also:

Build.addSystemCommand
pub fn addSystemCommand(b: *Build, argv: []const []const u8) *Step.Run

File

lib/std/Build.zig:894

Code

pub fn addSystemCommand(b: *Build, argv: []const []const u8) *Step.Run {
    assert(argv.len >= 1);
    const run_step = Step.Run.create(b, b.fmt("run {s}", .{argv[0]}));
    run_step.addArgs(argv);
    return run_step;
}