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 standard library.
std › Build › systemIntegrationOption Public Function systemIntegrationOption Doc Source Public Function std.Build.systemIntegrationOption
pub fn systemIntegrationOption (
b : *Build ,
name : []const u8 ,
config : SystemIntegrationOptionConfig ,
) bool Params File Build.zig: 2553
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582 pub fn systemIntegrationOption (
b : *Build ,
name : []const u8 ,
config : SystemIntegrationOptionConfig ,
) bool {
const graph = b .graph ;
const arena = graph .arena ;
const gop = graph .system_integration_options .getOrPut (arena , name ) catch @panic ("OOM" );
if (gop .found_existing ) switch (gop .value_ptr .*) {
.user_disabled => {
gop .value_ptr .* = .declared_disabled ;
return false ;
},
.user_enabled => {
gop .value_ptr .* = .declared_enabled ;
return true ;
},
.declared_disabled => return false ,
.declared_enabled => return true ,
} else {
gop .key_ptr .* = graph .dupeString (name );
if (config .default orelse graph .system_package_mode ) {
gop .value_ptr .* = .declared_enabled ;
return true ;
} else {
gop .value_ptr .* = .declared_disabled ;
return false ;
}
}
}