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

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

File

lib/std/Build/Step/TranslateC.zig:29

Code

pub fn create(owner: *std.Build, options: Options) *TranslateC {
    const graph = owner.graph;
    const translate_c = graph.create(TranslateC);
    const source = options.root_source_file.dupe(graph);
    translate_c.* = .{
        .step = .init(.{
            .tag = base_tag,
            .name = "translate-c",
            .owner = owner,
        }),
        .source = source,
        .target = options.target,
        .optimize = options.optimize,
        .output_file = graph.addGeneratedFile(&translate_c.step),
        .link_libc = options.link_libc,
    };
    source.addStepDependencies(&translate_c.step);
    return translate_c;
}