chloro 0.5.1

A minimal Rust code formatter
Documentation

chloro

crates.io documentation MIT/Apache-2.0 licensed pre-commit.ci status free of syn

chloro is a minimal Rust code formatter.

Motivation

For when you want to format two source files in a consistent way, as fast as possible.

How it works

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.

Installation

Add chloro to your Cargo.toml:

[dependencies]
chloro = "0.5"

Migration

The CLI automatically migrates code from doc comments to chloro #[omnidoc] attributes.

CLI Installation

  • pre-built binary: cargo binstall chloro (requires cargo-binstall),
  • build from source: cargo install chloro --features cli

License

This project is licensed under either of:

at your option.