xdsl 0.69.0


pip install xdsl

  Latest version

Released: Jul 21, 2026


Meta
Author: Mathieu Fehr
Requires Python: >=3.10

Classifiers

Programming Language
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Build Status for the Core backend PyPI version Downloads Downloads Code Coverage Zulip Status

xDSL: A Python-native SSA Compiler Framework

xDSL is a Python-native framework for building compiler infrastructure. It provides SSA-based intermediate representations (IRs) and Pythonic APIs to define, assemble, and optimize custom IRs—all with seamless compatibility with MLIR from the LLVM project.

Inspired by MLIR, xDSL enables smooth translation of programs and abstractions between frameworks. This lets users prototype compilers entirely in Python, while still accessing MLIR's powerful optimization and code generation pipeline. All IRs in xDSL employ a unified SSA-based data structure, with regions and basic blocks, making it easy to write generic analyses and transformation passes.

xDSL supports assembling compilers from predefined or custom IRs, and organizing transformations across a multi-level IR stack. This layered approach enables abstraction-specific optimization passes, similar to the architecture of projects like Devito, PSyclone, and Firedrake.

In short, xDSL makes it possible to:

  • Prototype compilers quickly in Python
  • Build DSLs with custom IRs
  • Run analyses and transformations with simple scripts
  • Interoperate smoothly with MLIR and benefit from LLVM's backend

Contents

Installation

To contribute to xDSL, follow the xDSL Developer Setup Guide.

To use xDSL as part of a larger project for developing your own compiler, just install xDSL via pip:

pip install xdsl

To quickly install xDSL for development and contribution purposes, use:

pip install xdsl[dev]

This may be useful for projects wanting to replicate the xDSL testing setup.

Note: This version of xDSL is validated against a specific MLIR version, interoperability with other versions is not guaranteed. The supported MLIR version is 22.1.2.

[!IMPORTANT]

Experimental Pyright Features

xDSL currently relies on an experimental feature of Pyright called TypeForm. TypeForm is in discussion and will likely land in some future version of Python.

For xDSL to type check correctly using Pyright, please add this to your pyproject.toml:

[tool.pyright]
enableExperimentalFeatures = true

Subprojects With Extra Dependencies

xDSL has a number of subprojects, some of which require extra dependencies. To keep the set of dependencies to a minimum, these extra dependencies have to be specified explicitly, e.g. by using:

pip install xdsl[gui] # or [jax], [riscv]

Getting Started

Check out the dedicated Getting Started guide for a comprehensive tutorial.

To get familiar with xDSL, we recommend starting with our tutorial notebooks. The notebooks provide hands-on examples and documentation of xDSL's core concepts: data structures, the Python-embedded abstraction definition language, and end-to-end custom compilers construction, like a database compiler. There also exists a small documentation showing how to connect xDSL with MLIR for users interested in that use case.

We provide a Makefile containing a lot of common tasks, which might provide an overview of common actions.

Discussion

You can also join the discussion at our Zulip chat room, kindly supported by community hosting from Zulip.

0.69.0 Jul 21, 2026
0.68.0 Jul 03, 2026
0.67.0 Jun 28, 2026
0.66.0 Jun 05, 2026
0.65.0 May 29, 2026
0.64.0 May 14, 2026
0.63.0 Apr 24, 2026
0.62.1 Apr 17, 2026
0.62.0 Apr 10, 2026
0.61.0 Apr 10, 2026
0.60.0 Apr 03, 2026
0.59.0 Mar 20, 2026
0.58.0 Mar 19, 2026
0.57.3 Mar 12, 2026
0.57.2 Mar 06, 2026
0.57.1 Feb 28, 2026
0.57.0 Feb 19, 2026
0.56.2 Jan 30, 2026
0.56.1 Jan 09, 2026
0.56.0 Dec 16, 2025
0.55.4 Dec 05, 2025
0.55.3 Nov 28, 2025
0.55.2 Nov 21, 2025
0.55.1 Nov 14, 2025
0.55.0 Nov 05, 2025
0.54.4 Oct 31, 2025
0.54.3 Oct 25, 2025
0.54.2 Oct 24, 2025
0.54.1 Oct 12, 2025
0.54.0 Oct 03, 2025
0.53.0 Sep 27, 2025
0.52.0 Sep 19, 2025
0.51.0 Sep 11, 2025
0.50.0 Aug 21, 2025
0.49.0 Aug 19, 2025
0.48.3 Aug 08, 2025
0.48.2 Aug 08, 2025
0.48.1 Aug 08, 2025
0.48.0 Aug 08, 2025
0.47.0 Jul 28, 2025
0.46.0 Jul 21, 2025
0.45.0 Jul 11, 2025
0.44.0 Jul 09, 2025
0.43.0 Jun 29, 2025
0.42.0 Jun 20, 2025
0.41.0 Jun 14, 2025
0.40.0 Jun 09, 2025
0.39.0 May 30, 2025
0.38.1 May 24, 2025
0.38.0 May 23, 2025
0.37.0 May 09, 2025
0.36.0 May 02, 2025
0.35.0 Apr 22, 2025
0.31.1 Mar 29, 2025
0.31.0 Mar 24, 2025
0.30.1 Mar 14, 2025
0.29.1 Mar 14, 2025
0.29.0 Mar 04, 2025
0.28.0 Feb 12, 2025
0.27.0 Jan 27, 2025
0.26.0 Jan 13, 2025
0.25.0 Dec 06, 2024
0.24.0 Nov 28, 2024
0.23.0 Oct 11, 2024
0.22.0 Sep 02, 2024
0.21.1 Jul 23, 2024
0.21.0 Jul 18, 2024
0.20.0 Jun 06, 2024
0.19.0 May 02, 2024
0.18 Apr 17, 2024
0.17 Feb 01, 2024
0.16.0 Dec 19, 2023
0.15.0 Oct 13, 2023
0.14.0 Aug 14, 2023
0.13.0 May 26, 2023
0.12.1 May 03, 2023
0.11.0 Apr 18, 2023
0.10.0 Apr 17, 2023
0.9.1 Feb 07, 2023
0.9 Feb 01, 2023
0.8.1 Jan 25, 2023
0.8.0 Jan 09, 2023
0.7.5 Nov 28, 2022
0.7.4 Nov 14, 2022
0.7.1 Nov 14, 2022
0.5.3 Aug 15, 2022
0.5.2 Jul 22, 2022
0.5.1 Jul 16, 2022
0.5.0 Jun 10, 2022
0.4.3 May 16, 2022
0.4.2 May 06, 2022
0.4.1 Mar 30, 2022
0.4.0 Mar 28, 2022
0.3.4 Mar 24, 2022
0.3.3 Mar 18, 2022
0.3.2 Mar 18, 2022
0.3.1 Mar 16, 2022
0.3.0 Mar 12, 2022
0.2.5 Feb 23, 2022
0.2.4 Feb 23, 2022
0.2.3 Jan 26, 2022
0.2.2 Jan 26, 2022
0.2.1 Jan 26, 2022
0.2.0 Jan 21, 2022
0.1.7 Jan 07, 2022
0.1.6 Jan 06, 2022
0.1.5 Jan 04, 2022
0.1.4 Jan 03, 2022
0.1.3 Jan 02, 2022
0.1.2 Dec 29, 2021
0.1.1 Dec 28, 2021
0.1.0 Dec 28, 2021
0.0.11 Dec 20, 2021
0.0.10 Dec 17, 2021
0.0.9 Dec 16, 2021
0.0.8 Dec 13, 2021
0.0.7 Dec 03, 2021
0.0.6 Dec 02, 2021
0.0.5 Nov 30, 2021
0.0.4 Nov 29, 2021
0.0.3 Nov 29, 2021
0.0.2 Oct 24, 2021
0.0.1 Sep 15, 2021

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
immutabledict (<4.3.2)
ordered-set (==4.1)
typing-extensions (<5,>=4.7)