xdsl
xDSL
Decision gist · record as of 2026-08-14
Yes, if you are building compiler infrastructure or DSLs and want to prototype in Python with MLIR compatibility. The framework is actively maintained, has low install friction, and is permissively licensed. Not necessary if you only need to consume compiled code or work with existing compilers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Type checking with Pyright requires experimental TypeForm feature enabled in pyproject.toml.
- Low install friction with three lightweight runtime dependencies.
License · maintenance · safety
permissive license (permissive) — Apache License v2.0 with LLVM Exceptions is permissive; you can use xDSL in commercial and proprietary projects with minimal restrictions.
last release 2026-07-21 (24 days) · last repo commit 2026-08-14 · 580 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 514,154 downloads/mo, #6,239 on PyPI
Alternatives
Verify before relying
pip install xdsl
from xdsl.ir import MLContext
from xdsl.dialects.builtin import ModuleOp
ctx = MLContext()
module = ModuleOp([])- Whether MLIR version 22.1.2 is still current or if newer versions are now supported
- Performance characteristics when handling large IR graphs or complex optimization passes
- Maturity level of the GUI, JAX, and RISC-V subprojects relative to core IR functionality
What it is and what it does
xDSL is a Python-native compiler framework that lets you define, assemble, and optimize custom intermediate representations (IRs) using a unified SSA-based data structure. It draws inspiration from MLIR (the LLVM project's compiler infrastructure) but runs entirely in Python, making it accessible for rapid prototyping and experimentation. The framework provides Pythonic APIs to work with regions, basic blocks, and SSA values, enabling you to write generic analyses and transformation passes that work across different IR levels.
The main use case is building domain-specific language (DSL) compilers and compiler infrastructure without leaving Python. You can prototype a complete compiler stack, layer custom IRs for abstraction-specific optimizations, and then interoperate with MLIR's backend for code generation. Dependencies are minimal (immutabledict, ordered-set, typing-extensions), and the package is actively maintained with support for modern Python versions.
Use it for
- Prototype a custom compiler for a domain-specific language entirely in Python before committing to C++
- Build multi-level IR stacks with abstraction-specific optimization passes for scientific computing or database workloads
- Analyze and transform programs using generic SSA-based passes that work across different IR dialects
- Integrate Python-based compiler development with MLIR's optimization and code generation pipeline
- Develop and test compiler passes iteratively using Python scripts without recompilation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building compiler infrastructure or DSLs and want to prototype in Python with MLIR compatibility.
The framework is actively maintained, has low install friction, and is permissively licensed. Not necessary if you only need to consume compiled code or work with existing compilers.
Install
xdsl on PyPI
Before you install
Low install friction with three lightweight runtime dependencies. Actively maintained with a release 24 days ago and recent commits; supports Python 3.10 through 3.14.
Requires Python 3.10 or later. Type checking with Pyright requires experimental TypeForm feature enabled in pyproject.toml.
License in practice
Apache License v2.0 with LLVM Exceptions is permissive; you can use xDSL in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install xdsl
from xdsl.ir import MLContext
from xdsl.dialects.builtin import ModuleOp
ctx = MLContext()
module = ModuleOp([])
Verify before relying
- Whether MLIR version 22.1.2 is still current or if newer versions are now supported
- Performance characteristics when handling large IR graphs or complex optimization passes
- Maturity level of the GUI, JAX, and RISC-V subprojects relative to core IR functionality
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesimmutabledictordered-settyping-extensions |
| Maintenance | Actively maintained 24 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 514,154 / month, #6,239 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: xdsl-0.69.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python compiler framework”
- xdslxDSL is a Python framework for building compiler infrastructure using…
- tinygradtinygrad is a minimal deep learning framework providing a tensor…
- quadrantsQuadrants is a high-performance compiler that translates Python code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also flydsl · tosa-tools · llvmlite · apache-tvm-ffi · onnx-ir · systemrdl-compiler · siliconcompiler · nvidia-cutlass-dsl-libs-base · nvidia-cutlass-dsl · pyvex