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.
pubconstgetauxval = if (extern_getauxval) struct {
comptime {
constroot = @import("root");
// Export this only when building an executable, otherwise it is overriding
// the libc implementation
if (builtin.output_mode == .Exeor@hasDecl(root, "main")) {
@export(&getauxvalImpl, .{ .name = "getauxval", .linkage = .weak });
}
}
externfngetauxval(index: usize) usize;
}.getauxvalelsegetauxvalImpl