Skip to content
SPECIFICTION
Get listed

CSharpier vs rustfmt

CSharpier

csharpier.com

rustfmt

rust-lang.github.io

Side by side

FigureCSharpierrustfmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Plans published11
Spec score · Code formatters8.0 (#3)7.9 (#4)
Spec score · Code Formatting Tools8.0 (#8)8.0 (#10)
ConfigurationConfiguration can use .csharpierrc JSON or YAML files or .editorconfig, with options including print width, tabs, indentation, and line endings.Configuration can be set in `rustfmt.toml` or `.rustfmt.toml`, and the default style conforms to the Rust style guide.
Editor integrationsOfficial extensions or plugins are listed for Visual Studio 2022, Visual Studio 2019, Visual Studio Code, and Rider; the page also describes setups for Neovim, Emacs, and Zed.The README lists integrations or usage instructions for Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code, and IntelliJ or CLion.
PurposeCSharpier parses C# and XML code and reprints it using its own formatting rules.rustfmt formats Rust code according to style guidelines.

Plans

CSharpier

  • FreeFree

CSharpier pricing →

rustfmt

  • rustfmtFree

rustfmt pricing →

In their own words

CSharpier

CSharpier is a free, open-source formatter for C# and XML. It parses source files and reprints them using its own formatting rules, with only a few basic options rather than a broad set of style switches. The homepage states support through C# version 14. Configuration can be kept in .csharpierrc JSON or YAML files or in .editorconfig, covering print width, tabs, indentation, and line endings. CSharpier runs as a .NET tool, installed for one project or globally, and CSharpier.Core provides a NuGet API for formatting from code. It can check files and returns a failing exit code by default when formatting is incorrect. Automation options include pre-commit hooks, MSBuild builds, and CI/CD workflows. Integrations are listed for Visual Studio 2022 and 2019, Visual Studio Code, Rider, Neovim, Emacs, and Zed. It runs on Windows, macOS, and Linux. Code that cannot compile produces error diagnostics instead of being formatted.

Visit csharpier.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