rust-lang/rustfmt

Format Rust code

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 30 minutes ago
Added to GitGenius on September 9th, 2026
Created on March 7th, 2015
Open Issues & Pull Requests: 941 (+0)
GitHub issues: Enabled
Number of forks: 1,049
Total Stargazers: 6,961 (+0)
Total Subscribers: 51 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.4 hours
Mean response time: 88.2 days
90th percentile: 183.2 days
Tracked items: 706

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 83% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Work labelled "I-trailing-whitespace" is answered fastest, typically in about 5 hours, while "unstable-option" waits about 11 months. 55% of tracked open issues have had no activity in three months. Only 3% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 400
New in 7 days: 9
Closed in 7 days: 7
Avg open age: 1,231 days
Stale 30+ days: 337
Stale 90+ days: 284

Recent activity

Opened in 7 days: 7
Closed in 7 days: 6
Comments in 7 days: 4
Events in 7 days: 26

Top labels

  • C-bug (270)
  • A-comments (118)
  • P-low (95)
  • C-feature-request (69)
  • I-poor-formatting (59)
  • S-duplicate (57)
  • A-macros (54)
  • unstable-option (54)

Detailed Description

Rustfmt is a code formatter that automatically formats Rust code according to style guidelines.

The tool addresses the need for consistent code formatting across Rust projects by parsing and reformatting source code to follow a standard style. It works by reading Rust source files, including modules referenced within them, and applying formatting rules. The formatter can process individual files, entire crates, or workspaces, and integrates with Cargo through the `cargo fmt` command. It can also read from standard input, making it suitable for use in automated workflows and continuous integration systems.

Rustfmt suits any Rust project seeking to enforce consistent code style without manual effort. It works with both stable and nightly Rust toolchains, though the nightly version offers the latest features. The tool is particularly valuable in team environments and CI/CD pipelines where style consistency matters. Developers should be aware of its limitations: it does not format code that fails to parse, has incomplete support for macros and comments, cannot format code fragments in isolation, and may not handle non-ASCII Unicode reliably. The README notes that formatting stability is guaranteed only for complete, compilable programs post-1.0, meaning formatting behavior may change for edge cases as the tool improves.

The project maintains active test coverage through continuous integration. Development activity shows regular engagement with the codebase and responsiveness to the project's stated goals of expanding formatting capabilities while maintaining stability guarantees for well-formed Rust programs.