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/ › Target/ › msp430.zig › all_features
all_features
msp430.all_features
pub const all_features = blk :
File
Code
pub const all_features = blk : {
const len = @typeInfo (Feature ).@"enum" .field_names .len ;
std .debug .assert (len <= CpuFeature .Set .needed_bit_count );
var result : [len ]CpuFeature = undefined ;
result [@backingInt (Feature .ext )] = .{
.llvm_name = "ext" ,
.description = "Enable MSP430-X extensions" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (Feature .hwmult16 )] = .{
.llvm_name = "hwmult16" ,
.description = "Enable 16-bit hardware multiplier" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (Feature .hwmult32 )] = .{
.llvm_name = "hwmult32" ,
.description = "Enable 32-bit hardware multiplier" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
result [@backingInt (Feature .hwmultf5 )] = .{
.llvm_name = "hwmultf5" ,
.description = "Enable F5 series hardware multiplier" ,
.dependencies = featureSet (&[_ ]Feature {}),
};
const ti = @typeInfo (Feature );
for (&result , 0 ..) |*elem , i | {
elem .index = i ;
elem .name = ti .@"enum" .field_names [i ];
}
break :blk result ;
}