A look at llvm/eudsl: 86 stars on GitHub, written primarily in Python. Embedded Universal DSL: a good DSL for us, by us
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This repository contains the source code for EUDSL, a toolkit for the construction of
embedded DSLs, in arbitrary languages, for targeting MLIR.
FYI: this project is currently "alpha" quality.
Currently, there are six components:
eudsl-tblgen: Python bindings to LLVM's TableGen library;
eudsl-nbgen: A source-to-source translator that translates MLIR headers1 into direct nanobind bindings;
mlir-python-bindings: Scripts/CMake for nightly builds of the upstream MLIR Python bindings;
Available via pip install mlir-python-bindings -f https://llvm.github.io/eudsl.
eudsl-python-extras: Extra utilities for the upstream MLIR Python bindings;
Available via pip install eudsl-python-extras -f https://llvm.github.io/eudslif used with the upstream bindings.
In reality, this package is meant to work in concert with any set of "host bindings" (some distribution of the actual MLIR Python bindings).
So that means the pip install should be amended to
where EUDSL_PYTHON_EXTRAS_HOST_PACKAGE_PREFIX is (as it says) the package prefix for your chosen host bindings.
When in doubt about this prefix, it is everything up until ir when you import your bindings, e.g., in import torch_mlir.ir,
torch_mlir is the EUDSL_PYTHON_EXTRAS_HOST_PACKAGE_PREFIX for the torch-mlir bindings.
mlir-python-mcp: An MCP server exposing a persistent MLIR Python REPL, so that a coding agent can build and transform IR through the bindings rather than by editing MLIR text;
Available via pip install mlir-python-mcp -f https://llvm.github.io/eudsl.
See projects/mlir-python-mcp/README.md for the .mcp.json snippet and the list of tools.
eudsl-llvmpy: Python bindings for LLVM IR (and Machine IR), plus small DSLs for authoring both from Python;
The bindings are a hand-written nanobind wrapper over the LLVM C++ API, so the Python class hierarchy mirrors llvm::; the DSL lowers a decorated Python function (with ordinary arithmetic and if/while/for) to a compiled llvm::Function.
A third surface, llvm.mir, reaches one level lower — LLVM's post-instruction-selection Machine IR — with the same split: hand-written bindings over the MachineFunction/MachineInstr object model plus a @machine_function DSL for building generic (GlobalISel) MIR.
Available via pip install eudsl-llvmpy -f https://llvm.github.io/eudsl.
See projects/eudsl-llvmpy/README.md and projects/eudsl-llvmpy/tests.
Wasm Playground
We currently provide two online playgrounds where you can try out the WebAssembly version of mlir-python-bindings and eudsl-python-extras directly in your browser:
https://llvm.github.io/eudsl/jupyter – A JupyterLite instance with a Pyodide kernel. You can install the MLIR Python bindings with: await piplite.install("mlir-python-bindings").
https://llvm.github.io/eudsl/console – A Pyodide-based REPL with mlir-python-bindings and eudsl-python-extras preloaded. Just run: from mlir.ir import * to start coding.
Getting started
Python wheels of all the tools are available at the eudsl release page.
They are also pip install-able with .e.g
If you don't want to install locally, here is a colab notebook minimal working example.
Developing/building
Strong recommendation: check the CI scripts @ .github/workflows - they do a fresh checkout and build on every commit and are written to be read by a non-CI expert.
Initialize the submodules with
$ cd <EUDSL_CHECKOUT_DIR>
$ ./scripts/init_submodules.sh
rather than git submodule update --init --recursive. It does the same shallow, non-recursive init as CI and keeps third_party/dawn's nested submodules, which aren't needed, from being checked out. Pass paths to initialize only some submodules, e.g. ./scripts/init_submodules.sh third_party/llvm-project.
Firstly, you need a distribution of LLVM. You can build LLVM from source using our submodule by doing (on Mac/Linux or mingw):
$ cd <EUDSL_CHECKOUT_DIR>
$ ./scripts/build_llvm.sh
Alternatively you can download a distribution for your platform from the llvm release page.
Then each of the above tools can both be built as a conventional, standalone, CMake project and as a Python wheel.
The wheel build looks something like:
No homepage URL was recorded for llvm/eudsl in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does llvm/eudsl have any tags?
TopGit's last sync did not record any GitHub topics for llvm/eudsl. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on llvm/eudsl?
The most recent commit recorded on llvm/eudsl was 1 day ago, based on the GitHub push timestamp. The repository has 20 forks — one of the better signals of community interest.
How many stars does llvm/eudsl have?
llvm/eudsl has 86 GitHub stars — refresh the page for the live number, or check github.com/llvm/eudsl. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is llvm/eudsl written in?
llvm/eudsl is written primarily in Python. GitHub's language field is based on the largest share of bytes in the default branch.
What license does llvm/eudsl use?
llvm/eudsl is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about llvm/eudsl?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/llvm/eudsl is the definitive source.
Read full README in the tab above.
Curious whether eudsl is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about eudsl.