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
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
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