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 › zig › target › osArchName Public Function osArchName Doc Source Public Function std.zig.target.osArchName
pub fn osArchName (target : *const std .Target ) [:0 ]const u8 Params File zig/target.zig: 210
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225 pub fn osArchName (target : *const std .Target ) [:0 ]const u8 {
return switch (target .os .tag ) {
.linux => switch (target .cpu .arch ) {
.arm , .armeb , .thumb , .thumbeb => "arm" ,
.aarch64 , .aarch64_be => "aarch64" ,
.loongarch32 , .loongarch64 => "loongarch" ,
.mips , .mipsel , .mips64 , .mips64el => "mips" ,
.powerpc , .powerpcle , .powerpc64 , .powerpc64le => "powerpc" ,
.riscv32 , .riscv64 => "riscv" ,
.sparc , .sparc64 => "sparc" ,
.x86 , .x86_64 => "x86" ,
else => @tagName (target .cpu .arch ),
},
else => @tagName (target .cpu .arch ),
};
}