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.
Zig › std/ › Build/ › Serialize.zig › packageOptions
packageOptions
Serialize.packageOptions
pub fn packageOptions (b : *std .Build , wc : *Configuration .Wip ) Allocator .Error !void
File
Code
pub fn packageOptions (b : *std .Build , wc : *Configuration .Wip ) Allocator .Error !void {
const gpa = wc .gpa ;
try wc .available_options .ensureTotalCapacityPrecise (gpa , b .available_options_map .count ());
for (b .available_options_map .keys (), b .available_options_map .values ()) |name , *opt | {
wc .available_options .appendAssumeCapacity (.{
.name = try wc .addString (name ),
.description = try wc .addString (opt .description ),
.type = opt .type_id ,
.enum_options = if (opt .enum_options ) |enum_vals | .init (try wc .addStringList (enum_vals )) else .none ,
});
}
}