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.
pubinlinefnsymbol(comptimefunc: *constanyopaque, comptimename: []constu8) void {
@export(func, .{
.name = name,
// Normally, libc goes into a static archive, making all symbols
// overridable. However, Zig supports including the libc functions as part
// of the Zig Compilation Unit, so to support this use case we make all
// symbols weak.
.linkage = .weak,
// For WebAssembly, hidden visibility allows the symbol to be resolved to
// other modules, but will not export it to the host runtime.
.visibility = .hidden,
});
}