vaivaswatha/pliron

An Extensible Compiler IR Framework

478

stars

551

commits

Rust

primary language

Sep 11, 2026

updated

pliron-org.github.io/pliron/
compilers
ir
mlir
pliron

README

Programming Languages Intermediate Representation

Status Crates.io Docs.rs Discord

pliron is an extensible compiler IR framework in Rust, inspired by MLIR.

Build and Test

  • Install the rust toolchain.

  • cargo build and cargo test should build the compiler and run the testsuite.

  • To see a simple IR constructed (by the print_simple test), use the following command:

    cargo test print_simple -- --show-output
    

    It should print something like:

    builtin.module @bar 
    {
      ^block1v1():
        builtin.func @foo: builtin.function <()->(builtin.integer si64)> 
        {
          ^entry_block2v1():
            c0_v0 = test.constant builtin.integer <0: si64> !0;
            test.return c0_v0
        }
    }
    
    outlined_attributes:
    !0 = [builtin_given_names = builtin.given_names [c0]]
    
  • pliron provides an LLVM Dialect and consequently an llvm-opt tool that can parse LLVM-IR bitcode into the LLVM dialect and output LLVM-IR bitcode.

Using the Library

Add a dependence on the crate in your Rust project.

Current Status:

pliron is under active development. Every effort is made to ensure that the code is well tested and of production quality.

The LLVM dialect, although not complete, can be useful practically. It can, for example, compile bzip2 and lua and run their test suites. These two are already part of our llvm-opt testsuite.

We also plan to start work on supporting a cranelift dialect/backend soon.

Documentation & Resources

Projects using pliron

  • cuda-oxide: NVIDIA's Rust CUDA compiler.
  • cubecl: A multi-platform high-performance compute language extension for Rust.

Additional dialects and projects built on top of pliron are hosted under the pliron-org GitHub organization.

Discussions

Contributing to pliron

See CONTRIBUTING.md before opening a PR.

pliron-logo

Contributors

vaivaswatha

486 commits

wingertge

14 commits

kevinclancy

12 commits

marcantoinem

8 commits

vaivaswatha/pliron

An Extensible Compiler IR Framework

478

stars

551

commits

Rust

primary language

Sep 11, 2026

updated

pliron-org.github.io/pliron/
compilers
ir
mlir
pliron

README

Programming Languages Intermediate Representation

Status Crates.io Docs.rs Discord

pliron is an extensible compiler IR framework in Rust, inspired by MLIR.

Build and Test

  • Install the rust toolchain.

  • cargo build and cargo test should build the compiler and run the testsuite.

  • To see a simple IR constructed (by the print_simple test), use the following command:

    cargo test print_simple -- --show-output
    

    It should print something like:

    builtin.module @bar 
    {
      ^block1v1():
        builtin.func @foo: builtin.function <()->(builtin.integer si64)> 
        {
          ^entry_block2v1():
            c0_v0 = test.constant builtin.integer <0: si64> !0;
            test.return c0_v0
        }
    }
    
    outlined_attributes:
    !0 = [builtin_given_names = builtin.given_names [c0]]
    
  • pliron provides an LLVM Dialect and consequently an llvm-opt tool that can parse LLVM-IR bitcode into the LLVM dialect and output LLVM-IR bitcode.

Using the Library

Add a dependence on the crate in your Rust project.

Current Status:

pliron is under active development. Every effort is made to ensure that the code is well tested and of production quality.

The LLVM dialect, although not complete, can be useful practically. It can, for example, compile bzip2 and lua and run their test suites. These two are already part of our llvm-opt testsuite.

We also plan to start work on supporting a cranelift dialect/backend soon.

Documentation & Resources

Projects using pliron

  • cuda-oxide: NVIDIA's Rust CUDA compiler.
  • cubecl: A multi-platform high-performance compute language extension for Rust.

Additional dialects and projects built on top of pliron are hosted under the pliron-org GitHub organization.

Discussions

Contributing to pliron

See CONTRIBUTING.md before opening a PR.

pliron-logo

Contributors

vaivaswatha

486 commits

wingertge

14 commits

kevinclancy

12 commits

marcantoinem

8 commits

Languages

Rust

97.9%

LLVM

1.7%