std.system

Information about the target operating system, environment, and CPU.

Types 3

enumOS

Operating system.

Note

This is for cases where you need a value representing the OS at

runtime. If you're doing something which should compile differently on different OSes, then please use version (Windows), version (linux), etc.

See Also

win32 = 1Microsoft 32 bit Windows systems
win64Microsoft 64 bit Windows systems
linuxAll Linux Systems, except for Android
osxMac OS X
iOSiOS
tvOStvOS
watchOSwatchOS
freeBSDFreeBSD
netBSDNetBSD
openBSDOpenBSD
dragonFlyBSDDragonFlyBSD
solarisSolaris
haikuHaikuOS
androidAndroid
otherPosixOther Posix Systems
unknownUnknown
enumEndian

Byte order endianness.

Note

This is intended for cases where you need to deal with endianness at

runtime. If you're doing something which should compile differently depending on whether you're compiling on a big endian or little endian machine, then please use version (BigEndian) and version (LittleEndian).

See Also

bigEndianBig endian byte order
littleEndianLittle endian byte order
enumISA

Instruction Set Architecture.

Note

This is intended for cases where you need a value representing the

instruction set architecture at runtime. If you're doing something which should compile differently depending on instruction set architecture, then please use version (X86_64), version (ARM), etc.

See Also

x86Intel and AMD 32-bit processors
x86_64Intel and AMD 64-bit processors
armThe ARM architecture (32-bit) (AArch32 et al)
aarch64The Advanced RISC Machine architecture (64-bit)
asmJSThe asm.js intermediate programming language
avr8-bit Atmel AVR Microcontrollers
epiphanyThe Epiphany architecture
ppcThe PowerPC architecture, 32-bit
ppc64The PowerPC architecture, 64-bit
ia64The Itanium architecture (64-bit)
mips32The MIPS architecture, 32-bit
mips64The MIPS architecture, 64-bit
msp430The MSP430 architecture
nvptxThe Nvidia Parallel Thread Execution (PTX) architecture, 32-bit
nvptx64The Nvidia Parallel Thread Execution (PTX) architecture, 64-bit
riscv32The RISC-V architecture, 32-bit
riscv64The RISC-V architecture, 64-bit
sparcThe SPARC architecture, 32-bit
sparc64The SPARC architecture, 64-bit
s390The System/390 architecture, 32-bit
systemZThe System Z architecture, 64-bit
hppaThe HP PA-RISC architecture, 32-bit
hppa64The HP PA-RISC architecture, 64-bit
shThe SuperH architecture, 32-bit
webAssemblyThe WebAssembly virtual ISA (instruction set architecture), 32-bit
alphaThe Alpha architecture
loongArch32The LoongAtch architecture, 32-bit
loongArch64The LoongArch architecture, 64-bit
xtensaThe Xtensa architecture, 32-bit
unknownUnknown