-
Notifications
You must be signed in to change notification settings - Fork 967
Open
Labels
Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
Our company firewall takes a while to unpack and verify the files downloaded through rustup.
$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/2025-08-07/rust-docs-1.89.0-x86_64-unknown-linux-gnu.tar.xz", source: TimedOut })
info: retrying download for 'https://static.rust-lang.org/dist/2025-08-07/rust-docs-1.89.0-x86_64-unknown-linux-gnu.tar.xz'
^C⏎
I found that rust-docs
is especially susceptible. I timed its download, and it took 71 seconds before it was approved and the first bytes were transferred in the download.
The timeout is currently hardcoded to 30 seconds:
Line 589 in e43263a
.read_timeout(Duration::from_secs(30)) |
Steps
Run rustup on a network with an HTTPS proxy that delays downloads by verifying them. I unfortunately don't have any details on my corporations firewall.
Possible Solution(s)
Ideally the timeout should be increased, and/or be made configurable.
Notes
A workaround is to use the curl backend, which has a higher timeout.
$ RUSTUP_USE_CURL=1 rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
please file an issue if the default download backend does not work for your use case
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
please file an issue if the default download backend does not work for your use case
info: latest update on 2025-08-07, rust version 1.89.0 (29483883e 2025-08-04)
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
warn: RUSTUP_USE_CURL is set; the curl backend is deprecated,
please file an issue if the default download backend does not work for your use case
info: downloading component 'rust-std'
...
Rustup version
1.28.2
Installed toolchains
stable-x86_64-unknown-linux-gnu
OS version
WSL2 Debian 12 bookworm