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.
pubconstSystemLib = struct {
name: String,
flags: Flags,
pubconstIndex = enum(u32) {
_,
pubfnget(this: @This(), c: *constConfiguration) SystemLib {
returnextraData(c, SystemLib, @backingInt(this));
}
};
pubconstUsePkgConfig = enum(u2) {
/// Don't use pkg-config, just pass -lfoo where foo is name.no,
/// Try to get information on how to link the library from pkg-config./// If that fails, fall back to passing -lfoo where foo is name.yes,
/// Try to get information on how to link the library from pkg-config./// If that fails, error out.force,
};
pubconstLinkMode = std.builtin.LinkMode;
pubconstFlags = packedstruct(u32) {
needed: bool,
weak: bool,
use_pkg_config: UsePkgConfig,
preferred_link_mode: LinkMode,
search_strategy: SearchStrategy,
_: u25 = 0,
};
pubconstSearchStrategy = enum(u2) { paths_first, mode_first, no_fallback };
}