A tool for formatting Rust code according to style guidelines. You can use rustfmt in Travis CI builds. We provide a minimal Travis CI configuration (see here) and verify its status using another repository. You can run rustfmt with Rust 1.24 and above. Rustfmt tries to work on as much Rust code as possible. Sometimes, the code doesn't even need to compile! In general, we are looking to limit areas of instability; in particular, post-1.0, the formatting of most code should not change as Rustfmt improves. However, there are some things that Rustfmt can't do or can't do well (and thus where formatting might change significantly, even post-1.0). We would like to reduce the list of limitations over time. You can run Rustfmt by just typing rustfmt filename if you used cargo install. This runs rustfmt on the given file, if the file includes out of line modules, then we reformat those too.

Features

  • You can run rustfmt with Rust 1.24 and above
  • Verifying code is formatted
  • Run Rustfmt from your editor
  • Check style on a CI server
  • Rustfmt is designed to be very configurable
  • Rustfmt uses a style which conforms to the Rust style guide

Project Samples

Project Activity

See All Activity >

Categories

Data Formats

License

MIT License

Follow rustfmt

rustfmt Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of rustfmt!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Rust

Related Categories

Rust Data Formats Software

Registered

2022-01-11