rust-lang / rust-lang/rustup

rustfmt takes too long to install

Open
#4,278 8 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug incomplete O-macos O-windows
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Verification
Problem

Whenever I update my toolchain using rustup update, rustfmt seems to take an abnormally long time to install, i.e., info: installing component 'rustfmt' takes several minutes. Listed below are for the most recent instance.

Steps

Either run rustup component add rustfmt or rustup update while rustfmt is installed in the latter case.

Possible Solution(s)

No response

Notes

I've seen a similar anecdote on Discord, albeit on macOS, which suspected Microsoft Defender as the culprit but I'm not sure on this one.

Rustup version
rustup 1.28.1 (f9edccde0 2025-03-05)
Installed toolchains
Default host: x86_64-pc-windows-msvc
rustup home:  D:\scoop\persist\rustup-msvc\.rustup

installed toolchains
--------------------
stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (active, default)

active toolchain
----------------
name: stable-x86_64-pc-windows-msvc
active because: it's the default toolchain
installed targets:
  x86_64-pc-windows-gnu
  x86_64-pc-windows-msvc
OS version
Windows 10 22H2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing rustup component add rustfmt and rustup update on Windows 10 22H2 with rustup 1.28.1 and the listed toolchains, timing the rustfmt installation. Compare the behavior across the GNU and MSVC toolchains and investigate the installation path; done means identifying a reproducible cause and a verified resolution for the delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.