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.

findProgramLazy

Creates an anonymous Step that searches for an executable on the host that has more than one possible name.

Returns the LazyPath of the found executable. The search only takes place if the LazyPath will be used by a depending Step.

This API is useful in the following cases:

Names are searched in order, observing search prefixes first and then PATH environment variable.

Windows file name extensions are searched automatically, respecting the PATHEXT environment variable, so they need not be included in this list. However, even on Windows, the names will be checked without appending extensions first, so that can be used as a priority system.

See also:

Build.findProgramLazy
pub fn findProgramLazy(b: *Build, options: Step.FindProgram.Options) LazyPath

File

lib/std/Build.zig:1788

Code

pub fn findProgramLazy(b: *Build, options: Step.FindProgram.Options) LazyPath {
    return .{ .generated = .{ .index = Step.FindProgram.create(b, options).found_path } };
}