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.

populateGeneratedPaths

Run.populateGeneratedPaths
fn populateGeneratedPaths(
    maker: *Maker,
    output_placeholders: []const IndexedOutput,
    cache_root: Cache.Directory,
    digest: *const Cache.HexDigest,
) !void

File

Code

fn populateGeneratedPaths(
    maker: *Maker,
    output_placeholders: []const IndexedOutput,
    cache_root: Cache.Directory,
    digest: *const Cache.HexDigest,
) !void {
    const conf = &maker.scanned_config.configuration;
    const graph = maker.graph;

    for (output_placeholders) |placeholder| {
        const arg = placeholder.arg_index.get(conf);
        maker.generatedPath(arg.generated.value.?).* = .{
            .root_dir = cache_root,
            .sub_path = try Dir.path.join(graph.arena, &.{
                "o", digest, arg.basename.value.?.slice(conf),
            }),
        };
    }
}