Fields
step: Step,
cwd: ?[]const u8,
Set this to modify the current working directory TODO change this to a Build.Cache.Directory to better integrate with future child process cwd API.
env_map: ?*EnvMap,
Override this field to modify the environment, or use setEnvironmentVariable
stdio: StdIo = .infer_from_args,
Configures whether the Run step is considered to have side-effects, and also whether the Run step will inherit stdio streams, forwarding them to the parent process, in which case will require a global lock to prevent other steps from interfering with stdio while the subprocess associated with this Run step is running. If the Run step is determined to not have side-effects, then execution will be skipped if all output files are up-to-date and input files are unchanged.
stdin: StdIn = .none,
This field must be .none
if stdio is inherit
. It should be only set using setStdIn
.
extra_file_dependencies: []const []const u8 = ref,
Additional file paths relative to build.zig that, when modified, indicate that the Run step should be re-executed. If the Run step is determined to have side-effects, this field is ignored and the Run step is always executed when it appears in the build graph.
rename_step_with_output_arg: bool = true,
After adding an output argument, this step will by default rename itself for a better display name in the build summary. This can be disabled by setting this to false.
skip_foreign_checks: bool = false,
If this is true, a Run step which is configured to check the output of the executed binary will not fail the build if the binary cannot be executed due to being for a foreign binary to the host system which is running the build graph. Command-line arguments such as -fqemu and -fwasmtime may affect whether a binary is detected as foreign, as well as system configuration such as Rosetta (macOS) and binfmt_misc (Linux). If this Run step is considered to have side-effects, then this flag does nothing.
failing_to_execute_foreign_is_an_error: bool = true,
If this is true, failing to execute a foreign binary will be considered an error. However if this is false, the step will be skipped on failure instead.
This allows for a Run step to attempt to execute a foreign binary using an external executor (such as qemu) but not fail if the executor is unavailable.
max_stdio_size: usize = (10 * 1024) * 1024,
If stderr or stdout exceeds this amount, the child process is killed and the step fails.
captured_stdout: ?*Output = null,
captured_stderr: ?*Output = null,
has_side_effects: bool = false,
Functions
fn addDirectorySourceArg(self: *Run, directory_source: std.Build.LazyPath) void
deprecated: use
addDirectoryArg
fn addOutputFileArg(self: *Run, basename: []const u8) std.Build.LazyPath
This provides file path as a command line argument to the command being run, an…
This provides file path as a command line argument to the command being run, and returns a LazyPath which can be used as inputs to other APIs throughout the build system.
fn addPrefixedDirectoryArg(self: *Run, prefix: []const u8, directory_source: std.Build.LazyPath) void
No documentation provided.
fn addPrefixedDirectorySourceArg(self: *Run, prefix: []const u8, directory_source: std.Build.LazyPath) void
No documentation provided.
fn addPrefixedFileArg(self: *Run, prefix: []const u8, lp: std.Build.LazyPath) void
No documentation provided.
fn addPrefixedFileSourceArg(self: *Run, prefix: []const u8, lp: std.Build.LazyPath) void
No documentation provided.
fn addPrefixedOutputFileArg(self: *Run, prefix: []const u8, basename: []const u8) std.Build.LazyPath
No documentation provided.
fn expectStdErrEqual(self: *Run, bytes: []const u8) void
Adds a check for exact stderr match. Does not add any other checks.
fn expectStdOutEqual(self: *Run, bytes: []const u8) void
Adds a check for exact stdout match as well as a check for exit code 0, if ther…
Adds a check for exact stdout match as well as a check for exit code 0, if there is not already an expected termination check.
fn setEnvironmentVariable(self: *Run, key: []const u8, value: []const u8) void
No documentation provided.