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.

SystemLib

Configuration.SystemLib
pub const SystemLib = struct

File

lib/std/Build/Configuration.zig:2010

Code

pub const SystemLib = struct {
    name: String,
    flags: Flags,

    pub const Index = enum(u32) {
        _,

        pub fn get(this: @This(), c: *const Configuration) SystemLib {
            return extraData(c, SystemLib, @backingInt(this));
        }
    };

    pub const UsePkgConfig = 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,
    };

    pub const LinkMode = std.builtin.LinkMode;

    pub const Flags = packed struct(u32) {
        needed: bool,
        weak: bool,
        use_pkg_config: UsePkgConfig,
        preferred_link_mode: LinkMode,
        search_strategy: SearchStrategy,
        _: u25 = 0,
    };

    pub const SearchStrategy = enum(u2) { paths_first, mode_first, no_fallback };
}