Skip to content
SPECIFICTION
Get listed

autopep8 vs rustfmt

autopep8

github.com

rustfmt

rust-lang.github.io

Side by side

Figureautopep8rustfmt
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Plans published01
Spec score · Code Formatting Tools7.6 (#19)8.0 (#10)
ConfigurationIt supports configuration through pyproject.toml, setup.cfg, tox.ini, .pep8, and .flake8 files.Configuration can be set in `rustfmt.toml` or `.rustfmt.toml`, and the default style conforms to the Rust style guide.
LicensePyPI identifies the project license as MIT License.rustfmt is distributed under both the MIT License and Apache License 2.0.
Purposeautopep8 automatically formats Python code to conform to the PEP 8 style guide.rustfmt formats Rust code according to style guidelines.

Plans

autopep8

No plans published.

autopep8 pricing →

rustfmt

  • rustfmtFree

rustfmt pricing →

In their own words

autopep8

autopep8 has no write-up on Specifiction yet; its figures are above.

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