| Crates.io | pliron |
| lib.rs | pliron |
| version | 0.12.0 |
| created_at | 2022-09-04 10:10:10.402698+00 |
| updated_at | 2025-12-07 15:42:39.340898+00 |
| description | Programming Languages Intermediate RepresentatiON |
| homepage | |
| repository | https://github.com/vaivaswatha/pliron |
| max_upload_size | |
| id | 658229 |
| size | 510,964 |
pliron is an extensible compiler IR framework in Rust, inspired by MLIR.
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
{
^block_1v1():
builtin.func @foo: builtin.function <()->(builtin.integer si64)>
{
^entry_block_2v1():
c0_op_3v1_res0 = test.constant builtin.integer <0: si64>;
test.return c0_op_3v1_res0
}
}
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.
Add a dependence to the crate in your Rust project.
Note: pliron, is under active development. All effort is made to ensure that the code is well tested
and of production quality. Current efforts are directed at completing the LLVM dialect, which can
already compile bzip2.
We also plan to start work on supporting a cranelift dialect / backend soon.
pliron
with other compiler projects, touching upon some design decisions.pliron