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)
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 |
|---|---|---|---|
📱 |
ARM64 (AArch64) |
||
📱 |
ARM (32-bit) |
||
📱 |
ARMv5TE (little-endian) |
||
📱 |
ARMv6 (little-endian) |
||
📱 |
ARMv7 (little-endian) |
||
📱 |
ARMv8 (32-bit, little-endian) |
||
𝗶 |
Intel 80386 (i386) |
||
𝗶 |
Intel Pentium (i586) |
||
𝗶 |
Intel Pentium Pro (i686) |
||
🐉 |
LoongArch (64-bit) |
||
🔲 |
MIPS (32-bit, big-endian) |
||
🔲 |
MIPS64 (big-endian) |
||
🔲 |
MIPS64 (little-endian) |
||
🔲 |
MIPS (32-bit, little-endian) |
||
⚡ |
PowerPC (32-bit) |
||
⚡ |
PowerPC 64-bit (big-endian) |
||
⚡ |
PowerPC 64-bit (little-endian) |
||
Ⅴ |
RISC-V (32-bit) |
||
Ⅴ |
RISC-V (64-bit) |
||
🏢 |
IBM z/Architecture (s390x) |
||
☀️ |
SPARC (32-bit) |
||
☀️ |
SPARC (64-bit) |
||
🌐 |
WebAssembly (32-bit) |
||
🌐 |
WebAssembly (64-bit) |
||
🖥️ |
x86-64 (AMD64) |
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 |
||
|---|---|---|---|---|
🏛️ |
All architectures |
|||
📱 |
ARM architectures |
⬥ |
||
🔲 |
MIPS architectures |
⬥ |
||
☀️ |
SPARC architectures |
⬥ |
||
³² |
32-bit architectures |
|||
⁶⁴ |
64-bit architectures |
|||
🏢 |
IBM mainframe |
⬥ |
||
🐉 |
LoongArch |
⬥ |
||
⚡ |
PowerPC family |
⬥ |
||
Ⅴ |
RISC-V family |
⬥ |
||
🌐 |
WebAssembly |
⬥ |
||
𝘅 |
x86 family |
⬥ |
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.
Todo
Add mapping of architecture to manylinux Python targets? As per: - https://github.com/zaniebot/uv/blob/6e9a42e31b19f56abb69352c9e5b3b17a013ad45/crates/uv-platform-tags/src/platform.rs#L182-L199 - https://github.com/pypa/manylinux
- extra_platforms.AARCH64 = Architecture(id='aarch64', name='ARM64 (AArch64)')¶
Warning
Although
aarch64is the canonical ID for this architecture, some platforms may use the aliasarm64instead (e.g., macOS on Apple Silicon).Todo
Consider adding
arm64as an alias in the future.ID:
aarch64Name: ARM64 (AArch64)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/AArch64>_
Detection function:
is_aarch64()Pytest decorators:
skip_aarch64/unless_aarch64Groups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_64_BIT
- extra_platforms.ARM = Architecture(id='arm', name='ARM (32-bit)')¶
Predefined ARM (32-bit) architecture.
ID:
armName: ARM (32-bit)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/ARM_architecture_family>_
Detection function:
is_arm()Pytest decorators:
skip_arm/unless_armGroups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_32_BIT
- 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.
ID:
armv5telName: ARMv5TE (little-endian)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/ARM11>_
Detection function:
is_armv5tel()Pytest decorators:
skip_armv5tel/unless_armv5telGroups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.ARMV6L = Architecture(id='armv6l', name='ARMv6 (little-endian)')¶
Predefined ARMv6 (little-endian) architecture.
ID:
armv6lName: ARMv6 (little-endian)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/ARM11>_
Detection function:
is_armv6l()Pytest decorators:
skip_armv6l/unless_armv6lGroups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_32_BIT
- 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 simplyarmv7in other contexts.ID:
armv7lName: ARMv7 (little-endian)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/ARM_Cortex-A>_
Detection function:
is_armv7l()Pytest decorators:
skip_armv7l/unless_armv7lGroups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.ARMV8L = Architecture(id='armv8l', name='ARMv8 (32-bit, little-endian)')¶
Predefined ARMv8 (32-bit, little-endian) architecture.
ID:
armv8lName: ARMv8 (32-bit, little-endian)
Icon: 📱
Reference: <https://en.wikipedia.org/wiki/ARM_Cortex-A>_
Detection function:
is_armv8l()Pytest decorators:
skip_armv8l/unless_armv8lGroups (4):
ALL_ARCHITECTURES,ALL_ARM⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.I386 = Architecture(id='i386', name='Intel 80386 (i386)')¶
Todo
Alias this to
i486.ID:
i386Name: Intel 80386 (i386)
Icon: 𝗶
Reference: <https://en.wikipedia.org/wiki/Intel_80386>_
Detection function:
is_i386()Pytest decorators:
skip_i386/unless_i386Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,X86⬥
- extra_platforms.I586 = Architecture(id='i586', name='Intel Pentium (i586)')¶
Predefined Intel Pentium (i586) architecture.
ID:
i586Name: Intel Pentium (i586)
Icon: 𝗶
Reference: <https://en.wikipedia.org/wiki/P5_(microarchitecture)>_
Detection function:
is_i586()Pytest decorators:
skip_i586/unless_i586Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,X86⬥
- extra_platforms.I686 = Architecture(id='i686', name='Intel Pentium Pro (i686)')¶
Predefined Intel Pentium Pro (i686) architecture.
ID:
i686Name: Intel Pentium Pro (i686)
Icon: 𝗶
Reference: <https://en.wikipedia.org/wiki/P6_(microarchitecture)>_
Detection function:
is_i686()Pytest decorators:
skip_i686/unless_i686Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,X86⬥
- extra_platforms.LOONGARCH64 = Architecture(id='loongarch64', name='LoongArch (64-bit)')¶
Predefined LoongArch (64-bit) architecture.
ID:
loongarch64Name: LoongArch (64-bit)
Icon: 🐉
Reference: <https://en.wikipedia.org/wiki/Loongson#LoongArch>_
Detection function:
is_loongarch64()Pytest decorators:
skip_loongarch64/unless_loongarch64Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,LOONGARCH⬥
- extra_platforms.MIPS = Architecture(id='mips', name='MIPS (32-bit, big-endian)')¶
Predefined MIPS (32-bit, big-endian) architecture.
ID:
mipsName: MIPS (32-bit, big-endian)
Icon: 🔲
Reference: <https://en.wikipedia.org/wiki/MIPS_architecture>_
Detection function:
is_mips()Pytest decorators:
skip_mips/unless_mipsGroups (4):
ALL_ARCHITECTURES,ALL_MIPS⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.MIPS64 = Architecture(id='mips64', name='MIPS64 (big-endian)')¶
Predefined MIPS64 (big-endian) architecture.
ID:
mips64Name: MIPS64 (big-endian)
Icon: 🔲
Reference: <https://en.wikipedia.org/wiki/MIPS_architecture>_
Detection function:
is_mips64()Pytest decorators:
skip_mips64/unless_mips64Groups (4):
ALL_ARCHITECTURES,ALL_MIPS⬥,ALL_TRAITS,ARCH_64_BIT
- extra_platforms.MIPS64EL = Architecture(id='mips64el', name='MIPS64 (little-endian)')¶
Predefined MIPS64 (little-endian) architecture.
ID:
mips64elName: MIPS64 (little-endian)
Icon: 🔲
Reference: <https://en.wikipedia.org/wiki/MIPS_architecture>_
Detection function:
is_mips64el()Pytest decorators:
skip_mips64el/unless_mips64elGroups (4):
ALL_ARCHITECTURES,ALL_MIPS⬥,ALL_TRAITS,ARCH_64_BIT
- extra_platforms.MIPSEL = Architecture(id='mipsel', name='MIPS (32-bit, little-endian)')¶
Predefined MIPS (32-bit, little-endian) architecture.
ID:
mipselName: MIPS (32-bit, little-endian)
Icon: 🔲
Reference: <https://en.wikipedia.org/wiki/MIPS_architecture>_
Detection function:
is_mipsel()Pytest decorators:
skip_mipsel/unless_mipselGroups (4):
ALL_ARCHITECTURES,ALL_MIPS⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.PPC = Architecture(id='ppc', name='PowerPC (32-bit)')¶
Predefined PowerPC (32-bit) architecture.
ID:
ppcName: PowerPC (32-bit)
Icon: ⚡
Reference: <https://en.wikipedia.org/wiki/PowerPC>_
Detection function:
is_ppc()Pytest decorators:
skip_ppc/unless_ppcGroups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,POWERPC⬥
- extra_platforms.PPC64 = Architecture(id='ppc64', name='PowerPC 64-bit (big-endian)')¶
Predefined PowerPC 64-bit (big-endian) architecture.
ID:
ppc64Name: PowerPC 64-bit (big-endian)
Icon: ⚡
Reference: <https://en.wikipedia.org/wiki/Ppc64>_
Detection function:
is_ppc64()Pytest decorators:
skip_ppc64/unless_ppc64Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,POWERPC⬥
- extra_platforms.PPC64LE = Architecture(id='ppc64le', name='PowerPC 64-bit (little-endian)')¶
Note
Also known as
powerpc64leorppc64elin some distributions.ID:
ppc64leName: PowerPC 64-bit (little-endian)
Icon: ⚡
Reference: <https://en.wikipedia.org/wiki/Ppc64>_
Detection function:
is_ppc64le()Pytest decorators:
skip_ppc64le/unless_ppc64leGroups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,POWERPC⬥
- extra_platforms.RISCV32 = Architecture(id='riscv32', name='RISC-V (32-bit)')¶
Predefined RISC-V (32-bit) architecture.
ID:
riscv32Name: RISC-V (32-bit)
Icon: Ⅴ
Reference: <https://en.wikipedia.org/wiki/RISC-V>_
Detection function:
is_riscv32()Pytest decorators:
skip_riscv32/unless_riscv32Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,RISCV⬥
- extra_platforms.RISCV64 = Architecture(id='riscv64', name='RISC-V (64-bit)')¶
Predefined RISC-V (64-bit) architecture.
ID:
riscv64Name: RISC-V (64-bit)
Icon: Ⅴ
Reference: <https://en.wikipedia.org/wiki/RISC-V>_
Detection function:
is_riscv64()Pytest decorators:
skip_riscv64/unless_riscv64Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,RISCV⬥
- extra_platforms.S390X = Architecture(id='s390x', name='IBM z/Architecture (s390x)')¶
Predefined IBM z/Architecture (s390x) architecture.
ID:
s390xName: IBM z/Architecture (s390x)
Icon: 🏢
Reference: <https://en.wikipedia.org/wiki/Z/Architecture>_
Detection function:
is_s390x()Pytest decorators:
skip_s390x/unless_s390xGroups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,IBM_MAINFRAME⬥
- extra_platforms.SPARC = Architecture(id='sparc', name='SPARC (32-bit)')¶
Predefined SPARC (32-bit) architecture.
ID:
sparcName: SPARC (32-bit)
Icon: ☀️
Reference: <https://en.wikipedia.org/wiki/SPARC>_
Detection function:
is_sparc()Pytest decorators:
skip_sparc/unless_sparcGroups (4):
ALL_ARCHITECTURES,ALL_SPARC⬥,ALL_TRAITS,ARCH_32_BIT
- extra_platforms.SPARC64 = Architecture(id='sparc64', name='SPARC (64-bit)')¶
Predefined SPARC (64-bit) architecture.
ID:
sparc64Name: SPARC (64-bit)
Icon: ☀️
Reference: <https://en.wikipedia.org/wiki/SPARC>_
Detection function:
is_sparc64()Pytest decorators:
skip_sparc64/unless_sparc64Groups (4):
ALL_ARCHITECTURES,ALL_SPARC⬥,ALL_TRAITS,ARCH_64_BIT
- extra_platforms.UNKNOWN_ARCHITECTURE = Architecture(id='unknown_architecture', name='Unknown architecture')¶
Predefined Unknown architecture architecture.
ID:
unknown_architectureName: Unknown architecture
Icon: ❓
Reference: <https://en.wikipedia.org/wiki/Instruction_set_architecture>_
Detection function:
is_unknown_architecture()Pytest decorators:
skip_unknown_architecture/unless_unknown_architectureGroups (2):
ALL_TRAITS,UNKNOWN⬥
- extra_platforms.WASM32 = Architecture(id='wasm32', name='WebAssembly (32-bit)')¶
Predefined WebAssembly (32-bit) architecture.
ID:
wasm32Name: WebAssembly (32-bit)
Icon: 🌐
Reference: <https://en.wikipedia.org/wiki/WebAssembly>_
Detection function:
is_wasm32()Pytest decorators:
skip_wasm32/unless_wasm32Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_32_BIT,WEBASSEMBLY⬥
- extra_platforms.WASM64 = Architecture(id='wasm64', name='WebAssembly (64-bit)')¶
Predefined WebAssembly (64-bit) architecture.
ID:
wasm64Name: WebAssembly (64-bit)
Icon: 🌐
Reference: <https://en.wikipedia.org/wiki/WebAssembly>_
Detection function:
is_wasm64()Pytest decorators:
skip_wasm64/unless_wasm64Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,WEBASSEMBLY⬥
- extra_platforms.X86_64 = Architecture(id='x86_64', name='x86-64 (AMD64)')¶
Warning
Although
x86_64is the canonical ID for this architecture, some platforms may use the aliasamd64instead (e.g., Windows on x86-64).Todo
Consider adding
amd64as an alias in the future.ID:
x86_64Name: x86-64 (AMD64)
Icon: 🖥️
Reference: <https://en.wikipedia.org/wiki/X86-64>_
Detection function:
is_x86_64()Pytest decorators:
skip_x86_64/unless_x86_64Groups (4):
ALL_ARCHITECTURES,ALL_TRAITS,ARCH_64_BIT,X86⬥