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.
fnsetWatchInputsFromManifest(s: *Step, maker: *Maker, man: *Cache.Manifest) !void {
constgraph = maker.graph;
constarena = graph.arena; // TODO don't leak into process arenaconstprefixes = man.cache.prefixes();
clearWatchInputs(s, maker);
for (man.files.keys()) |file| {
// The file path data is freed when the cache manifest is cleaned up at the end of `make`.constsub_path = tryarena.dupe(u8, file.prefixed_path.sub_path);
tryaddWatchInputFromPath(s, maker, .{
.root_dir = prefixes[file.prefixed_path.prefix],
.sub_path = Dir.path.dirname(sub_path) orelse"",
}, Dir.path.basename(sub_path));
}
}