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.

Native

Register state for the native architecture, used by std.debug for stack unwinding. noreturn if there is no implementation for the native architecture. This can be overriden by exposing a declaration root.debug.CpuContext.

cpu_context.Native
pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
    root.debug.CpuContext
else switch (native_arch)

File

lib/std/debug/cpu_context.zig:4

Code

pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuContext"))
    root.debug.CpuContext
else switch (native_arch) {
    .aarch64, .aarch64_be => Aarch64,
    .alpha => Alpha,
    .arc, .arceb => Arc,
    .arm, .armeb, .thumb, .thumbeb => Arm,
    .csky => Csky,
    .hexagon => Hexagon,
    .kvx => Kvx,
    .lanai => Lanai,
    .loongarch32, .loongarch64 => LoongArch,
    .m68k => M68k,
    .m88k => M88k,
    .mips, .mipsel, .mips64, .mips64el => Mips,
    .or1k => Or1k,
    .powerpc, .powerpcle, .powerpc64, .powerpc64le => Powerpc,
    .sparc, .sparc64 => Sparc,
    .riscv32, .riscv32be, .riscv64, .riscv64be => Riscv,
    .ve => Ve,
    .s390x => S390x,
    .x86_16 => X86_16,
    .x86 => X86,
    .x86_64 => X86_64,
    else => noreturn,
}