rustfmt
6.7#2 in code formattersFree planFree planLinuxmacOSWindows
Visit
| Fact | rustfmt | Scalafmt |
|---|---|---|
| Configuration | Configuration can be set in `rustfmt.toml` or `.rustfmt.toml`, and the default style conforms to the Rust style guide. | Formatting options are set in a plain text .scalafmt.conf file using HOCON syntax. |
| Editor integrations | The README lists integrations or usage instructions for Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, and IntelliJ or CLion. | The documentation describes use with IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text, and Eclipse, with Metals supporting formatting requests from editors. |
| License | rustfmt is distributed under both the MIT License and Apache License 2.0. | The GitHub repository identifies the project license as Apache-2.0. |
| Purpose | rustfmt formats Rust code according to style guidelines. | Scalafmt is a code formatter for Scala that formats code consistently across a team. |
| Support | The README points users to `rustfmt --help` and `cargo fmt --help` for command usage and arguments. | The project site links to a community Discord and GitHub, and the CLI help directs bug reports to GitHub issues. |
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.
Scalafmt suits Scala developers and teams seeking consistent formatting through editors, build tools, or the command line. It is also relevant for projects using sbt files or Scala scripts.