Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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 standard library. Private Function

pkgHashFromBuildZig

Private Function
std.Build.pkgHashFromBuildZig
inline fn pkgHashFromBuildZig(comptime build_zig: type) ?[]const u8

Params

  • build_zig: type

File

Build.zig:2063
2063
2064
2065
2066
2067
2068
2069
2070
2071
inline fn pkgHashFromBuildZig(comptime build_zig: type) ?[]const u8 {
    comptime {
        const deps = @import("root").dependencies;
        return for (@typeInfo(deps.packages).@"struct".decl_names) |pkg_hash| {
            const pkg = @field(deps.packages, pkg_hash);
            if (@hasDecl(pkg, "build_zig") and pkg.build_zig == build_zig) break pkg_hash;
        } else null;
    }
}