Skip to content

Installation

Run rust-doctor with npx, install it with cargo, or build it from source.

The npm package is a launcher: it resolves the prebuilt binary for your platform and executes it. Nothing to install.

npx -y rust-doctor@latest .

To keep it around:

npm install -g rust-doctor

Prebuilt binaries ship for Linux, macOS and Windows on x64, plus Linux and macOS on arm64. Node 20.19 or later.

#cargo

cargo install rust-doctor

Compiles the crate and puts the binary in ~/.cargo/bin. Requires Rust 1.95 or later, and takes as long as building the tool, where npx downloads a binary already built.

Read a version below 0.4.0 on either registry with care. npm unpublished 0.1.1 through 0.2.0, and crates.io still serves its own 0.2.0, an earlier build of this same tool published in June 2026 before the rewrite: same name, same author, different product. 0.4.0 is the first version that means the same code on both, and one workflow now publishes them from one tag.

#From source

git clone https://github.com/arthjean/rust-doctor
cd rust-doctor
cargo build --release

The binary lands in target/release/rust-doctor. Requires Rust 1.95 or later.

#What the scan needs

Rust Doctor runs cargo clippy inside the workspace it inspects, so the workspace needs a Rust toolchain with the clippy component. Everything else is native: the four other producers parse source text, read manifests, or ask git what it tracks, and build nothing.

Clippy is required. The scan resolves cargo, rustc and clippy before any pass runs, and a toolchain missing one of them fails with exit code 2 and names what to install rather than scoring a workspace it never read. On CI, the toolchain actions install rustup's minimal profile, which has no clippy:

- uses: dtolnay/rust-toolchain@stable
  with:
    components: clippy

Locally, rustup component add clippy is the same fix.

#Verify

rust-doctor --version