# rust-lang/rustfmt

Format Rust code

Repository: https://github.com/rust-lang/rustfmt
Canonical: https://ross.abutalabs.com/products/rustfmt
Homepage: https://rust-lang.github.io/rustfmt/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, rustfmt, formatter, codeformatter
Last push: 2026-08-25T02:19:46+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4197, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6946, forks 1043 (observed 2026-08-28T04:09:51.657562+00:00)

## What it is
rustfmt is the official Rust code formatter that formats Rust code according to standard style guidelines. It integrates with cargo via `cargo fmt` and can be used in CI to enforce consistent code style.

## Use cases
- format rust code
- enforce rust style guidelines
- run cargo fmt on a project
- check code formatting in CI
- auto-format rust files

## When to choose
- you write Rust and want consistent, idiomatic formatting
- you want to enforce style checks in CI
- you want the official Rust formatter maintained by the Rust project

## When to avoid
- your code relies heavily on macros or comments that rustfmt cannot format reliably
- you need to format non-Rust languages
- your code does not parse (rustfmt requires parseable code)

## Facets
- artifact type: cli-tool
- maturity: stable
- function: formatter, developer-tools, cli
- domain: developer-tools, programming-languages
- platform: windows, cli, cross-platform
- tags: rust, code-style, cargo-fmt, style-guidelines, command-line, linux, macos

## Member repositories
- rust-lang/rustfmt (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:51.657562+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:13.444083+00:00, confidence not recorded.
  - readme: https://github.com/rust-lang/rustfmt (fetched 2026-08-28T04:09:51.657562+00:00, sha 0a5fab6a5650)
  - homepage: https://rust-lang.github.io/rustfmt/ (fetched 2026-08-29T08:37:00.050778+00:00, sha f6dad9b048c7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
