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.

create

InstallDir.create
pub fn create(owner: *std.Build, options: Options) *InstallDir

File

lib/std/Build/Step/InstallDir.zig:44

Code

pub fn create(owner: *std.Build, options: Options) *InstallDir {
    const install_dir = owner.allocator.create(InstallDir) catch @panic("OOM");
    const graph = owner.graph;
    install_dir.* = .{
        .step = Step.init(.{
            .tag = base_tag,
            .name = owner.fmt("install {f}/", .{options.source_dir}),
            .owner = owner,
        }),
        .options = options.dupe(graph),
    };
    options.source_dir.addStepDependencies(&install_dir.step);
    return install_dir;
}