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()

⬆️

BIG_ENDIAN

Big-endian architectures

is_big_endian()

🏒

IBM_MAINFRAME

IBM mainframe

is_ibm_mainframe()

β¬₯

⬇️

LITTLE_ENDIAN

Little-endian architectures

is_little_endian()

πŸ‰

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)
    

Endianness groupsΒΆ

Architectures are also grouped by endianness (big-endian vs little-endian), visualized as a Sankey diagram:

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

---
sankey-beta

ALL_ARCHITECTURES,LITTLE_ENDIAN,18
ALL_ARCHITECTURES,BIG_ENDIAN,7
LITTLE_ENDIAN,AARCH64,1
LITTLE_ENDIAN,ARM,1
LITTLE_ENDIAN,ARMV5TEL,1
LITTLE_ENDIAN,ARMV6L,1
LITTLE_ENDIAN,ARMV7L,1
LITTLE_ENDIAN,ARMV8L,1
LITTLE_ENDIAN,I386,1
LITTLE_ENDIAN,I586,1
LITTLE_ENDIAN,I686,1
LITTLE_ENDIAN,LOONGARCH64,1
LITTLE_ENDIAN,MIPS64EL,1
LITTLE_ENDIAN,MIPSEL,1
LITTLE_ENDIAN,PPC64LE,1
LITTLE_ENDIAN,RISCV32,1
LITTLE_ENDIAN,RISCV64,1
LITTLE_ENDIAN,WASM32,1
LITTLE_ENDIAN,WASM64,1
LITTLE_ENDIAN,X86_64,1
BIG_ENDIAN,MIPS,1
BIG_ENDIAN,MIPS64,1
BIG_ENDIAN,PPC,1
BIG_ENDIAN,PPC64,1
BIG_ENDIAN,S390X,1
BIG_ENDIAN,SPARC,1
BIG_ENDIAN,SPARC64,1
    

And the same endianness groups visualized as a mindmap:

        ---
config:
  mindmap:
    padding: 5

---
mindmap
    ((πŸ›οΈ ALL_ARCHITECTURES))
        )⬇️ LITTLE_ENDIAN(
            (πŸ“± AARCH64)
            (πŸ“± ARM)
            (πŸ“± ARMV5TEL)
            (πŸ“± ARMV6L)
            (πŸ“± ARMV7L)
            (πŸ“± ARMV8L)
            (𝗢 I386)
            (𝗢 I586)
            (𝗢 I686)
            (πŸ‰ LOONGARCH64)
            (πŸ”² MIPS64EL)
            (πŸ”² MIPSEL)
            (⚑ PPC64LE)
            (β…€ RISCV32)
            (β…€ RISCV64)
            (🌐 WASM32)
            (🌐 WASM64)
            (πŸ–₯️ X86_64)
        )⬆️ BIG_ENDIAN(
            (πŸ”² MIPS)
            (πŸ”² MIPS64)
            (⚑ PPC)
            (⚑ PPC64)
            (🏒 S390X)
            (β˜€οΈ SPARC)
            (β˜€οΈ SPARC64)
    

Predefined architecturesΒΆ

Architecture definitions and metadata.

Hint

Architecture’s canonical IDs are inspired by those used in the auditwheel project to encode the manylinux policies.

See also

Architecture variants from Rust’s target-lexicon.

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

Hint

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

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

Hint

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.architecture_data.X86_64 = Architecture(id='x86_64', name='x86-64 (AMD64)')

Hint

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

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

Hint

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

extra_platforms.ARM = Architecture(id='arm', name='ARM (32-bit)')ΒΆ
extra_platforms.ARMV5TEL = Architecture(id='armv5tel', name='ARMv5TE (little-endian)')ΒΆ

Hint

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)')ΒΆ
extra_platforms.ARMV7L = Architecture(id='armv7l', name='ARMv7 (little-endian)')ΒΆ
extra_platforms.ARMV8L = Architecture(id='armv8l', name='ARMv8 (32-bit, little-endian)')ΒΆ
extra_platforms.I386 = Architecture(id='i386', name='Intel 80386 (i386)')ΒΆ
extra_platforms.I586 = Architecture(id='i586', name='Intel Pentium (i586)')ΒΆ
extra_platforms.I686 = Architecture(id='i686', name='Intel Pentium Pro (i686)')ΒΆ
extra_platforms.LOONGARCH64 = Architecture(id='loongarch64', name='LoongArch (64-bit)')ΒΆ
extra_platforms.MIPS = Architecture(id='mips', name='MIPS (32-bit, big-endian)')ΒΆ
extra_platforms.MIPS64 = Architecture(id='mips64', name='MIPS64 (big-endian)')ΒΆ
extra_platforms.MIPS64EL = Architecture(id='mips64el', name='MIPS64 (little-endian)')ΒΆ
extra_platforms.MIPSEL = Architecture(id='mipsel', name='MIPS (32-bit, little-endian)')ΒΆ
extra_platforms.PPC = Architecture(id='ppc', name='PowerPC (32-bit)')ΒΆ
extra_platforms.PPC64 = Architecture(id='ppc64', name='PowerPC 64-bit (big-endian)')ΒΆ
extra_platforms.PPC64LE = Architecture(id='ppc64le', name='PowerPC 64-bit (little-endian)')ΒΆ
extra_platforms.RISCV32 = Architecture(id='riscv32', name='RISC-V (32-bit)')ΒΆ
extra_platforms.RISCV64 = Architecture(id='riscv64', name='RISC-V (64-bit)')ΒΆ
extra_platforms.S390X = Architecture(id='s390x', name='IBM z/Architecture (s390x)')ΒΆ
extra_platforms.SPARC = Architecture(id='sparc', name='SPARC (32-bit)')ΒΆ
extra_platforms.SPARC64 = Architecture(id='sparc64', name='SPARC (64-bit)')ΒΆ
extra_platforms.UNKNOWN_ARCHITECTURE = Architecture(id='unknown_architecture', name='Unknown architecture')ΒΆ
extra_platforms.WASM32 = Architecture(id='wasm32', name='WebAssembly (32-bit)')ΒΆ
extra_platforms.WASM64 = Architecture(id='wasm64', name='WebAssembly (64-bit)')ΒΆ
extra_platforms.X86_64 = Architecture(id='x86_64', name='x86-64 (AMD64)')ΒΆ

Hint

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