| Crates.io | chloro |
| lib.rs | chloro |
| version | 0.7.5 |
| created_at | 2025-11-21 01:07:07.159241+00 |
| updated_at | 2025-12-05 21:52:59.319912+00 |
| description | A minimal Rust code formatter |
| homepage | https://github.com/lmmx/chloro |
| repository | https://github.com/lmmx/chloro |
| max_upload_size | |
| id | 1942874 |
| size | 47,741 |
chloro is a minimal Rust code formatter.
For when you want to format two source files in a consistent way, as fast as possible.
Using rowan from the rust-analyzer project, which can give both green and red trees. The latter are notoriously expensive, but a formatter should only need the former.
Proof of concept library/CLI to explore a fast and low memory code formatter [WIP], with use cases of code diffing in mind.
Diff 'leaderboard' for how well formatting with chloro matches rustfmt, as tested on rust-analyzer's crates:
Summary: +84,596 / -12,699
| Top 5 |
Top 5 Added Lines |
|---|---|
- ) × 219- r#" × 140- }, × 108- check( × 90- ); × 87 |
+ }, × 131+"#) × 104+ check(r#" × 79+ } × 68+ } × 64 |
Add chloro to your Cargo.toml:
[dependencies]
chloro = "0.7"
cargo binstall chloro (requires cargo-binstall),cargo install chloro --features cliThis project is licensed under either of:
at your option.