Architectures

Each architecture represents a CPU instruction set, and is associated with:

  • a unique architecture ID

  • a human-readable name

  • an icon (emoji / unicode character)

  • a detection function

  • various metadata in its info() method

Architecture usage

Each architecture is materialized by an Architecture object, from which you can access various metadata:

>>> from extra_platforms import X86_64
>>> X86_64
Architecture(id='x86_64', name='x86-64 (AMD64)')
>>> X86_64.id
'x86_64'
>>> X86_64.current
True
>>> X86_64.info()
{'id': 'x86_64', 'name': 'x86-64 (AMD64)', 'icon': '💻', 'url': 'https://en.wikipedia.org/wiki/X86-64', 'current': True, 'machine': None, 'processor': None}

To check if the current architecture matches a specific architecture, use the corresponding detection function:

>>> from extra_platforms import is_x86_64
>>> is_x86_64()
True

The current architecture can be obtained via the current_architecture() function:

>>> from extra_platforms import current_architecture
>>> current_architecture()
Architecture(id='x86_64', name='x86-64 (AMD64)')

Recognized architectures

Icon

Symbol

Name

Detection function

📱

AARCH64

ARM64 (AArch64)

is_aarch64()

📱

ARM

ARM (32-bit)

is_arm()

📱

ARMV5TEL

ARMv5TE (little-endian)

is_armv5tel()

📱

ARMV6L

ARMv6 (little-endian)

is_armv6l()

📱

ARMV7L

ARMv7 (little-endian)

is_armv7l()

📱

ARMV8L

ARMv8 (32-bit, little-endian)

is_armv8l()

𝗶

I386

Intel 80386 (i386)

is_i386()

𝗶

I586

Intel Pentium (i586)

is_i586()

𝗶

I686

Intel Pentium Pro (i686)

is_i686()

🐉

LOONGARCH64

LoongArch (64-bit)

is_loongarch64()

🔲

MIPS

MIPS (32-bit, big-endian)

is_mips()

🔲

MIPS64

MIPS64 (big-endian)

is_mips64()

🔲

MIPS64EL

MIPS64 (little-endian)

is_mips64el()

🔲

MIPSEL

MIPS (32-bit, little-endian)

is_mipsel()

PPC

PowerPC (32-bit)

is_ppc()

PPC64

PowerPC 64-bit (big-endian)

is_ppc64()

PPC64LE

PowerPC 64-bit (little-endian)

is_ppc64le()

RISCV32

RISC-V (32-bit)

is_riscv32()

RISCV64

RISC-V (64-bit)

is_riscv64()

🏢

S390X

IBM z/Architecture (s390x)

is_s390x()

☀️

SPARC

SPARC (32-bit)

is_sparc()

☀️

SPARC64

SPARC (64-bit)

is_sparc64()

🌐

WASM32

WebAssembly (32-bit)

is_wasm32()

🌐

WASM64

WebAssembly (64-bit)

is_wasm64()

🖥️

X86_64

x86-64 (AMD64)

is_x86_64()

Hint

The UNKNOWN_ARCHITECTURE trait represents an unrecognized architecture. It is not included in the ALL_ARCHITECTURES group, and will be returned by current_architecture() if the current architecture is not recognized.

Groups of architectures

All architecture groups

Icon

Symbol

Description

Detection

Canonical

🏛️

ALL_ARCHITECTURES

All architectures

is_any_architecture()

📱

ALL_ARM

ARM architectures

is_any_arm()

🔲

ALL_MIPS

MIPS architectures

is_any_mips()

☀️

ALL_SPARC

SPARC architectures

is_any_sparc()

³²

ARCH_32_BIT

32-bit architectures

is_arch_32_bit()

⁶⁴

ARCH_64_BIT

64-bit architectures

is_arch_64_bit()

🏢

IBM_MAINFRAME

IBM mainframe

is_ibm_mainframe()

🐉

LOONGARCH

LoongArch

is_loongarch()

POWERPC

PowerPC family

is_powerpc()

RISCV

RISC-V family

is_riscv()

🌐

WEBASSEMBLY

WebAssembly

is_webassembly()

𝘅

X86

x86 family

is_x86()

Hint

Canonical groups are non-overlapping groups that together cover all recognized traits. They are marked with a ⬥ icon in the table above.

Other groups are provided for convenience, but overlap with each other or with canonical groups.

Canonical groups

All recognized architectures are grouped in canonical families, with each architecture belonging to exactly one family.

Here are the non-overlapping families that encompass all recognized architectures, visualized as a Sankey diagram:

        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

ALL_ARCHITECTURES,ALL_ARM,6
ALL_ARCHITECTURES,X86,4
ALL_ARCHITECTURES,ALL_MIPS,4
ALL_ARCHITECTURES,POWERPC,3
ALL_ARCHITECTURES,WEBASSEMBLY,2
ALL_ARCHITECTURES,RISCV,2
ALL_ARCHITECTURES,ALL_SPARC,2
ALL_ARCHITECTURES,LOONGARCH,1
ALL_ARCHITECTURES,IBM_MAINFRAME,1
ALL_ARM,AARCH64,1
ALL_ARM,ARM,1
ALL_ARM,ARMV5TEL,1
ALL_ARM,ARMV6L,1
ALL_ARM,ARMV7L,1
ALL_ARM,ARMV8L,1
X86,I386,1
X86,I586,1
X86,I686,1
X86,X86_64,1
ALL_MIPS,MIPS,1
ALL_MIPS,MIPS64,1
ALL_MIPS,MIPS64EL,1
ALL_MIPS,MIPSEL,1
POWERPC,PPC,1
POWERPC,PPC64,1
POWERPC,PPC64LE,1
WEBASSEMBLY,WASM32,1
WEBASSEMBLY,WASM64,1
RISCV,RISCV32,1
RISCV,RISCV64,1
ALL_SPARC,SPARC,1
ALL_SPARC,SPARC64,1
LOONGARCH,LOONGARCH64,1
IBM_MAINFRAME,S390X,1
    

And the same families visualized as a mindmap:

        ---
config:
  mindmap:
    padding: 5

---
mindmap
    ((🏛️ ALL_ARCHITECTURES))
        )𝘅 X86(
            (𝗶 I386)
            (𝗶 I586)
            (𝗶 I686)
            (🖥️ X86_64)
        )🌐 WEBASSEMBLY(
            (🌐 WASM32)
            (🌐 WASM64)
        )Ⅴ RISCV(
            (Ⅴ RISCV32)
            (Ⅴ RISCV64)
        )⚡ POWERPC(
            (⚡ PPC)
            (⚡ PPC64)
            (⚡ PPC64LE)
        )🐉 LOONGARCH(
            (🐉 LOONGARCH64)
        )🏢 IBM_MAINFRAME(
            (🏢 S390X)
        )☀️ ALL_SPARC(
            (☀️ SPARC)
            (☀️ SPARC64)
        )🔲 ALL_MIPS(
            (🔲 MIPS)
            (🔲 MIPS64)
            (🔲 MIPS64EL)
            (🔲 MIPSEL)
        )📱 ALL_ARM(
            (📱 AARCH64)
            (📱 ARM)
            (📱 ARMV5TEL)
            (📱 ARMV6L)
            (📱 ARMV7L)
            (📱 ARMV8L)
    

Bitness groups

Architectures are also grouped by bitness (32-bit vs 64-bit), visualized as a Sankey diagram:

        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

ALL_ARCHITECTURES,ARCH_32_BIT,14
ALL_ARCHITECTURES,ARCH_64_BIT,11
ARCH_32_BIT,ARM,1
ARCH_32_BIT,ARMV5TEL,1
ARCH_32_BIT,ARMV6L,1
ARCH_32_BIT,ARMV7L,1
ARCH_32_BIT,ARMV8L,1
ARCH_32_BIT,I386,1
ARCH_32_BIT,I586,1
ARCH_32_BIT,I686,1
ARCH_32_BIT,MIPS,1
ARCH_32_BIT,MIPSEL,1
ARCH_32_BIT,PPC,1
ARCH_32_BIT,RISCV32,1
ARCH_32_BIT,SPARC,1
ARCH_32_BIT,WASM32,1
ARCH_64_BIT,AARCH64,1
ARCH_64_BIT,LOONGARCH64,1
ARCH_64_BIT,MIPS64,1
ARCH_64_BIT,MIPS64EL,1
ARCH_64_BIT,PPC64,1
ARCH_64_BIT,PPC64LE,1
ARCH_64_BIT,RISCV64,1
ARCH_64_BIT,S390X,1
ARCH_64_BIT,SPARC64,1
ARCH_64_BIT,WASM64,1
ARCH_64_BIT,X86_64,1
    

And the same bitness groups visualized as a mindmap:

        ---
config:
  mindmap:
    padding: 5

---
mindmap
    ((🏛️ ALL_ARCHITECTURES))
        )⁶⁴ ARCH_64_BIT(
            (📱 AARCH64)
            (🐉 LOONGARCH64)
            (🔲 MIPS64)
            (🔲 MIPS64EL)
            (⚡ PPC64)
            (⚡ PPC64LE)
            (Ⅴ RISCV64)
            (🏢 S390X)
            (☀️ SPARC64)
            (🌐 WASM64)
            (🖥️ X86_64)
        )³² ARCH_32_BIT(
            (📱 ARM)
            (📱 ARMV5TEL)
            (📱 ARMV6L)
            (📱 ARMV7L)
            (📱 ARMV8L)
            (𝗶 I386)
            (𝗶 I586)
            (𝗶 I686)
            (🔲 MIPS)
            (🔲 MIPSEL)
            (⚡ PPC)
            (Ⅴ RISCV32)
            (☀️ SPARC)
            (🌐 WASM32)
    

Predefined architectures

Architecture definitions and metadata.

See also

Architecture variants from Rust’s target-lexicon.

extra_platforms.AARCH64 = Architecture(id='aarch64', name='ARM64 (AArch64)')

Warning

Although aarch64 is the canonical ID for this architecture, some platforms may use the alias arm64 instead (e.g., macOS on Apple Silicon).

Todo

Consider adding arm64 as an alias in the future.

extra_platforms.ARM = Architecture(id='arm', name='ARM (32-bit)')

Predefined ARM (32-bit) architecture.

extra_platforms.ARMV5TEL = Architecture(id='armv5tel', name='ARMv5TE (little-endian)')

Note

ARMv5TE includes Thumb and DSP extensions. This architecture is found on older ARM devices and may appear in embedded systems or legacy platforms.

extra_platforms.ARMV6L = Architecture(id='armv6l', name='ARMv6 (little-endian)')

Predefined ARMv6 (little-endian) architecture.

extra_platforms.ARMV7L = Architecture(id='armv7l', name='ARMv7 (little-endian)')

Note

This architecture is commonly referred to as armhf (ARM hard-float) in Debian-based distributions, or simply armv7 in other contexts.

extra_platforms.ARMV8L = Architecture(id='armv8l', name='ARMv8 (32-bit, little-endian)')

Predefined ARMv8 (32-bit, little-endian) architecture.

extra_platforms.I386 = Architecture(id='i386', name='Intel 80386 (i386)')

Todo

Alias this to i486.

extra_platforms.I586 = Architecture(id='i586', name='Intel Pentium (i586)')

Predefined Intel Pentium (i586) architecture.

extra_platforms.I686 = Architecture(id='i686', name='Intel Pentium Pro (i686)')

Predefined Intel Pentium Pro (i686) architecture.

extra_platforms.LOONGARCH64 = Architecture(id='loongarch64', name='LoongArch (64-bit)')

Predefined LoongArch (64-bit) architecture.

extra_platforms.MIPS = Architecture(id='mips', name='MIPS (32-bit, big-endian)')

Predefined MIPS (32-bit, big-endian) architecture.

extra_platforms.MIPS64 = Architecture(id='mips64', name='MIPS64 (big-endian)')

Predefined MIPS64 (big-endian) architecture.

extra_platforms.MIPS64EL = Architecture(id='mips64el', name='MIPS64 (little-endian)')

Predefined MIPS64 (little-endian) architecture.

extra_platforms.MIPSEL = Architecture(id='mipsel', name='MIPS (32-bit, little-endian)')

Predefined MIPS (32-bit, little-endian) architecture.

extra_platforms.PPC = Architecture(id='ppc', name='PowerPC (32-bit)')

Predefined PowerPC (32-bit) architecture.

extra_platforms.PPC64 = Architecture(id='ppc64', name='PowerPC 64-bit (big-endian)')

Predefined PowerPC 64-bit (big-endian) architecture.

extra_platforms.PPC64LE = Architecture(id='ppc64le', name='PowerPC 64-bit (little-endian)')

Note

Also known as powerpc64le or ppc64el in some distributions.

extra_platforms.RISCV32 = Architecture(id='riscv32', name='RISC-V (32-bit)')

Predefined RISC-V (32-bit) architecture.

extra_platforms.RISCV64 = Architecture(id='riscv64', name='RISC-V (64-bit)')

Predefined RISC-V (64-bit) architecture.

extra_platforms.S390X = Architecture(id='s390x', name='IBM z/Architecture (s390x)')

Predefined IBM z/Architecture (s390x) architecture.

extra_platforms.SPARC = Architecture(id='sparc', name='SPARC (32-bit)')

Predefined SPARC (32-bit) architecture.

extra_platforms.SPARC64 = Architecture(id='sparc64', name='SPARC (64-bit)')

Predefined SPARC (64-bit) architecture.

extra_platforms.UNKNOWN_ARCHITECTURE = Architecture(id='unknown_architecture', name='Unknown architecture')

Predefined Unknown architecture architecture.

extra_platforms.WASM32 = Architecture(id='wasm32', name='WebAssembly (32-bit)')

Predefined WebAssembly (32-bit) architecture.

extra_platforms.WASM64 = Architecture(id='wasm64', name='WebAssembly (64-bit)')

Predefined WebAssembly (64-bit) architecture.

extra_platforms.X86_64 = Architecture(id='x86_64', name='x86-64 (AMD64)')

Warning

Although x86_64 is the canonical ID for this architecture, some platforms may use the alias amd64 instead (e.g., Windows on x86-64).

Todo

Consider adding amd64 as an alias in the future.