EVERYTHING XIAOMI
Get listed
Side by side

Fourmolu vs rustfmt

Fourmolu

6.7#3 in code formatting toolsFree plan
Free planWebLinuxWindows
Visit

rustfmt

6.7#2 in code formattersFree plan
Free planLinuxmacOSWindows
Visit

What both publish

FactFourmolurustfmt
ConfigurationSettings can be provided in a fourmolu.yaml file or as command-line options.Configuration can be set in `rustfmt.toml` or `.rustfmt.toml`, and the default style conforms to the Rust style guide.
LimitationsThe README describes CPP support as experimental and says it works only in simple cases where CPP conditionals surround top-level declarations.The README lists limitations involving unparsable code, macros, comments, code fragments, non-ASCII Unicode, and bugs.
PurposeFourmolu formats Haskell source code and is a configurable fork of Ormolu.rustfmt formats Rust code according to style guidelines.

Fourmolu plans

  • FourmoluFree

rustfmt plans

  • rustfmtFree

Pick Fourmolu if…

It suits Haskell developers who want configurable source formatting, including teams seeking editor or CI integration. Developers using CPP or CRLF line endings should review its stated limitations.

Pick rustfmt if…

rustfmt suits Rust developers who want consistent formatting through Cargo, an editor, or CI. It is also relevant to developers who need configurable formatting behavior.

Charts they share