#compiler-optimization #compiler #e-graph #framework #optimization

intarsia-build

Build helpers for compiling ISLE rulset files in build scripts for Intarsia optimizers

1 unstable release

Uses new Rust 2024

0.1.0 Mar 13, 2026

#1875 in Programming languages


Used in intarsia

Custom license

11KB
72 lines

Build-time helpers for compiling ISLE DSL files to Rust code.

This crate provides utilities for Cargo build scripts to compile ISLE (Instruction Selection Lowering Expressions) domain-specific language files into Rust code. It uses the cranelift-isle compiler internally.

Example

In your Cargo.toml:

[dependencies]
intarsia = "0.1"

[build-dependencies]
intarsia-build = "*"

In your build.rs:

fn main() {
    intarsia_build::compile_isle_auto().unwrap();
}

Intarsia Optimizer Framework

An extensible optimizer framework based on ISLE and egg.

Given a set of rewrite rules (written in ISLE) and the corresponding language definition in Rust, we build an optimizer that explores all possible rewrites (up to some work budget) and stores equivalent terms in an egg e-graph.

README is a work in progress, check back later for more details.

v0 Design and Features

  • Declarative rewrites in ISLE (following a specific formatted)
  • Rust macros to easily integrate compiled ISLE with the optimizer e-graph/search modules
  • Support for any custom language defined as a Rust enum
  • Cascades style optimization strategy

Future Features

  • A new rewrite DSL that naturally integrates with the Rust optimizer module once compiled (no more manual integration with macros)
  • Better support for properties with a multe-graph
  • Programmable search strategies
  • Fine-grained cost-based bounding in search

Dependencies

~2–4MB
~64K SLoC