Know if your Rust code
is actually healthy.

One command. One score. Security, performance, correctness, architecture, and dependencies. Scanned in seconds.

Star on GitHub
rust-doctor

$

What it checks

Everything clippy doesn't.

LINTS

700+

Clippy lints

Severity overrides across pedantic, nursery, and cargo groups.

AST

19

Custom rules

Error handling, performance, architecture, security, async, and framework anti-patterns via syn.

DEPS

5

Cargo tools

cargo-audit, cargo-deny, cargo-geiger, cargo-machete, cargo-semver-checks.

FRAMEWORKS

3

Runtime targets

tokio, axum, actix-web — blocking in async, missing handlers, spawn without move.

External tools are optional — missing ones are skipped gracefully. Run rust-doctor --install-deps to install them all at once.

Scoring

One number. Zero ambiguity.

Weighted across 5 dimensions (Security ×2, Reliability ×1.5, Maintainability, Performance, Dependencies). Per dimension: 100 − errors ×1.5 − warnings ×0.75 − info ×0.25. Counts unique rules, not occurrences — fix one issue entirely and the penalty disappears.

75–100

Great

50–74

Needs work

0–49

Critical

MCP Server

Built for AI coding assistants.

rust-doctor includes a built-in Model Context Protocol server. Claude Code, Cursor, VS Code — any MCP-compatible tool can scan your project, explain rules, and suggest fixes.

scan

Full diagnostics + health score

score

Quick 0–100 pass/fail

explain_rule

Rule docs + fix guidance

list_rules

Browse all available checks

Install

Pick your method.

npx

npx -y rust-doctor@latest .

cargo

cargo install rust-doctor

MCP

claude mcp add --transport stdio -s user rust-doctor -- npx -y rust-doctor --mcp

Skill

npx skills add https://github.com/ArthurDEV44/rust-doctor --skill rust-doctor

GitHub Actions

- uses: ArthurDEV44/rust-doctor@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    fail-on: warning

Rules

19 custom AST rules.

Error Handling

unwrap-in-production
Warning

Error Handling

panic-in-library
Error

Error Handling

box-dyn-error-in-public-api
Warning

Error Handling

result-unit-error
Warning

Performance

excessive-clone
Warning

Performance

string-from-literal
Info

Performance

collect-then-iterate
Warning

Performance

large-enum-variant
Warning

Performance

unnecessary-allocation
Warning

Architecture

high-cyclomatic-complexity
Warning

Security

hardcoded-secrets
Error

Security

unsafe-block-audit
Warning

Security

sql-injection-risk
Error

Async

blocking-in-async
Error

Async

block-on-in-async
Error

Framework

tokio-main-missing
Error

Framework

tokio-spawn-without-move
Error

Framework

axum-handler-not-async
Warning

Framework

actix-blocking-handler
Warning

FAQ

Common questions.