Skip to content
SPECIFICTION
Get listed

Ormolu vs rustfmt

Ormolu

github.com

rustfmt

rust-lang.github.io

Side by side

FigureOrmolurustfmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WebYes—
WindowsYesYes
macOSYesYes
LinuxYesYes
Plans published11
Spec score · Code Formatting Tools7.8 (#14)8.0 (#10)
Editor integrationsThe README lists integrations for Emacs, VS Code, and Vim through neoformat or vim-ormolu.The README lists integrations or usage instructions for Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, and IntelliJ or CLion.
LicenseThe project’s license permits redistribution and use in source and binary forms subject to stated conditions and provides the software “as is.”rustfmt is distributed under both the MIT License and Apache License 2.0.
LimitationsCPP support is experimental and 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.
PurposeOrmolu is a formatter for Haskell source code.rustfmt formats Rust code according to style guidelines.

Plans

Ormolu

  • OrmoluFree

Ormolu pricing →

rustfmt

  • rustfmtFree

rustfmt pricing →

In their own words

Ormolu

Ormolu is a formatter for Haskell source code. It uses GHC’s parser and applies one consistent style, with the aim of keeping diffs small. That style cannot be configured, and the project aims to leave code unchanged when it is formatted again after already meeting the style. Release binaries are available for Linux, macOS, and Windows; installation through cabal or stack is also supported. Ormolu Live provides a browser version. Listed editor integrations cover Emacs, VS Code, and Vim through neoformat or vim-ormolu, and Haskell Language Server has built-in support for Ormolu. For continuous integration, the project recommends the run-ormolu GitHub Action. It reads default language extensions and dependencies from a matching Cabal file;.ormolu files can specify fixity overrides and module re-export instructions. CPP support remains experimental and works only in simple cases where conditionals surround top-level declarations. Ormolu is open source and free, with a listed plan price of free.

Visit github.com

rustfmt

rustfmt formats Rust code according to style guidelines. It can format files directly or read code from standard input and write formatted output to standard output. With Cargo, `cargo fmt` formats binary and library targets in a crate and works with workspaces. A `rustfmt.toml` or `.rustfmt.toml` file can hold configuration, including stable and nightly-only options. For automated checks, `--check` returns code 0 when no formatting changes are needed and code 1 when changes would be made; it can be used in CI to fail a build on formatting differences. The README lists editor use with Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, IntelliJ, and CLion. Rustfmt is available on Windows, macOS, and Linux, and is distributed under the MIT License and Apache License 2.0. It does not attempt to format comments, and listed limitations also involve macros, unparsable code, fragments, and non-ASCII Unicode. Unstable settings require opt-in on nightly, and the README says the latest version requires the nightly toolchain.

Visit rust-lang.github.io