A Rust toolchain for Tailwind CSS v4.1-style builds

ironframe builds CSS in Rust and aims to match Tailwind CSS v4.1 behavior and output. It keeps scanning, generation, configuration, and the CLI separate so you can measure, test, and release builds with Rust alone.

Scan, build, and watch from the CLI

Run scan, build, or watch from the command line. Build once or watch for changes, skip files with ignore globs, minimize the CSS, and compare it against a reference with compare-css.

Keep familiar Tailwind CSS features

Use @import "tailwindcss", the include, exclude, and inline forms of @source, @apply, split imports, --spacing(), and --alpha().

Test and extend each part on its own

The core, scanner, generator, and config are separate Rust components. That makes it easier to find bottlenecks, check compatibility, and add features a piece at a time.

Set up and check a CSS build

Start with cargo install or cargo run, then try scan, build, or watch. When you move an existing project, use --compare-css to check the output against a reference and set up the build in ironframe.toml.

Install Rust and Cargo, then run the install command from your ironframe checkout. Run the examples on your own web project and use its paths. Example 1 needs the path to Cargo.toml in the checkout. Examples 2–5 use the installed ironframe command. Examples 3 and 4 use an input CSS file that imports tailwindcss or ironframe. Example 3 also uses ironframe.toml. Example 4 needs a reference CSS file.

Install the CLI

cargo install --path .

Commands to try

terminal
  1. Find class candidates with cargo run

    cargo run --manifest-path "../ironframe/Cargo.toml" -- scan "src/**/*.{html,tsx}"
  2. Run a single build

    ironframe build --output dist/tailwind.css "src/**/*.{html,tsx}"
  3. Build from a CSS template and config file

    ironframe build -i src/app.css -c ironframe.toml -o dist/app.css "src/**/*.{html,tsx}"
  4. Compare your build to a reference

    ironframe build -i src/app.css -o dist/app.css --compare-css dist/app.tailwind.css "src/**/*.{html,tsx}"
  5. Poll for file changes and rebuild

    ironframe watch --poll --poll-interval 250 -o dist/app.css "src/**/*.{html,tsx}"
Check the CSS before switching

ironframe aims to match the output of Tailwind CSS v4.1. Before switching over, compare the generated CSS with your current build and add a check to catch changes in CI.