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

builderToPackage

Private Function
std.Build.Serialize.builderToPackage
fn builderToPackage(s: *Serialize, b: *std.Build) !Configuration.Package.Index

Params

File

Build/Serialize.zig:726
726
727
728
729
730
731
732
733
734
735
736
737
738
739
fn builderToPackage(s: *Serialize, b: *std.Build) !Configuration.Package.Index {
    if (b.pkg_hash.len == 0) return .root;
    const arena = s.arena;
    const wc = s.wc;
    const gop = try s.package_map.getOrPut(arena, b);
    if (!gop.found_existing) {
        gop.value_ptr.* = try wc.addExtra(Configuration.Package, .{
            .hash = try wc.addString(b.pkg_hash),
            .dep_prefix = try wc.addString(b.dep_prefix),
            .root_path = try wc.addString(try b.root.toString(arena)),
        });
    }
    return gop.value_ptr.*;
}