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

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ΒΆ

Groups of architecturesΒΆ

All recognized architectures are grouped in 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,ANY_ARM,5
ALL_ARCHITECTURES,X86,4
ALL_ARCHITECTURES,ANY_MIPS,4
ALL_ARCHITECTURES,POWERPC,3
ALL_ARCHITECTURES,WEBASSEMBLY,2
ALL_ARCHITECTURES,RISCV,2
ALL_ARCHITECTURES,ANY_SPARC,2
ALL_ARCHITECTURES,LOONGARCH,1
ALL_ARCHITECTURES,IBM_MAINFRAME,1
ANY_ARM,aarch64,1
ANY_ARM,arm,1
ANY_ARM,armv6l,1
ANY_ARM,armv7l,1
ANY_ARM,armv8l,1
X86,i386,1
X86,i586,1
X86,i686,1
X86,x86_64,1
ANY_MIPS,mips,1
ANY_MIPS,mips64,1
ANY_MIPS,mips64el,1
ANY_MIPS,mipsel,1
POWERPC,ppc,1
POWERPC,ppc64,1
POWERPC,ppc64le,1
WEBASSEMBLY,wasm32,1
WEBASSEMBLY,wasm64,1
RISCV,riscv32,1
RISCV,riscv64,1
ANY_SPARC,sparc,1
ANY_SPARC,sparc64,1
LOONGARCH,loongarch64,1
IBM_MAINFRAME,s390x,1
ALL_ARCHITECTURES,unknown_architecture,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)
        )β˜€οΈ ANY_SPARC(
            (β˜€οΈ sparc)
            (β˜€οΈ sparc64)
        )πŸ”§ ANY_MIPS(
            (πŸ”§ mips)
            (πŸ”§ mips64)
            (πŸ”§ mips64el)
            (πŸ”§ mipsel)
        )πŸ“± ANY_ARM(
            (πŸ”‹ aarch64)
            (πŸ“± arm)
            (πŸ“± armv6l)
            (πŸ“± armv7l)
            (πŸ“± armv8l)
        (❓ unknown_architecture)
    

Individual architecture familiesΒΆ

Icon

Group ID

Description

Member count

Non-overlapping

πŸ›οΈ

all_architectures

All architectures

25

⚠️

πŸ“±

any_arm

Any ARM architecture

5

βœ…

πŸ”§

any_mips

Any MIPS architecture

4

βœ…

β˜€οΈ

any_sparc

Any SPARC architecture

2

βœ…

🏒

ibm_mainframe

IBM mainframe

1

βœ…

πŸ‰

loongarch

LoongArch

1

βœ…

⚑

powerpc

PowerPC family

3

βœ…

🌱

riscv

RISC-V family

2

βœ…

🌐

webassembly

WebAssembly

2

βœ…

πŸ”²

x86

x86 family

4

βœ…

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

---
sankey-beta

ANY_ARM,aarch64,1
ANY_ARM,arm,1
ANY_ARM,armv6l,1
ANY_ARM,armv7l,1
ANY_ARM,armv8l,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

ANY_MIPS,mips,1
ANY_MIPS,mips64,1
ANY_MIPS,mips64el,1
ANY_MIPS,mipsel,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

ANY_SPARC,sparc,1
ANY_SPARC,sparc64,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

IBM_MAINFRAME,s390x,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

LOONGARCH,loongarch64,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

POWERPC,ppc,1
POWERPC,ppc64,1
POWERPC,ppc64le,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

RISCV,riscv32,1
RISCV,riscv64,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

WEBASSEMBLY,wasm32,1
WEBASSEMBLY,wasm64,1
    
        ---
config:
  sankey:
    height: 800
    showValues: false
    width: 800

---
sankey-beta

X86,i386,1
X86,i586,1
X86,i686,1
X86,x86_64,1
    

extra_platforms.architecture APIΒΆ

        classDiagram
  Trait <|-- Architecture
    

CPU architectures.

class extra_platforms.architecture.Architecture(id, name, icon='β–£', url='')[source]ΒΆ

Bases: Trait

A CPU architecture identifies a processor instruction set.

It has a unique ID, a human-readable name, and boolean to flag current architecture.

icon: str = 'β–£'ΒΆ

Icon of the architecture.

info()[source]ΒΆ

Returns all architecture attributes we can gather.

Return type:

dict[str, str | bool | None]

extra_platforms.architecture_data APIΒΆ

Architecture definitions and metadata.

See also

Architecture variants from Rust’s target-lexicon.