It is very easy to update Rust on Windows to the latest version. You could install either the stable or nightly release and update from it. For those new to Rust, I would recommend installing the stable release.
Install Rust
Although Rust is not difficult to install (or update) on Windows, one must still muster some patience because the process may not be straightforward to all of us. To install Rust on Windows, follow the steps on How to Install Rust on Windows 10 The Easy And Painless Way. Note that there is a newer version of MS Visual C++ Build Tools. If you failed on the first attempt, treat the post as a general approach. There may be new configurations but rest assured the content will serve as groundwork.
As of this writing, the latest version of Rust is 1.59.0. To try the Rust update of Windows by yourself, you may consider installing an earlier version like 1.58.1.
Update Rust Using the rustup Command
Before running the rustup command, ensure you successfully installed and configured Rust on Windows. To check if Rust is available, use one of the other CLI commands. For example, the rustc.
1 2 | C:\>rustc --version rustc 1.58.1 (db9d1b20b 2022-01-20) |
If the rustc command works, we can update Rust to the latest version on Windows. The rustup command has many sub-commands for options. To update Rust, we use the rustup command as follows.
1 | C:\>rustup update |
When we run the command, we get the following output. Your output will vary.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | C:\Users\karldev>rustup update info: syncing channel updates for 'stable-x86_64-pc-windows-msvc' info: latest update on 2022-02-24, rust version 1.59.0 (9d1b2106e 2022-02-23) info: downloading component 'rls' info: downloading component 'rust-analysis' info: downloading component 'rust-src' info: downloading component 'cargo' info: downloading component 'clippy' info: downloading component 'rust-docs' 19.4 MiB / 19.4 MiB (100 %) 10.3 MiB/s in 1s ETA: 0s info: downloading component 'rust-std' 23.7 MiB / 23.7 MiB (100 %) 12.4 MiB/s in 2s ETA: 0s info: downloading component 'rustc' 55.6 MiB / 55.6 MiB (100 %) 11.8 MiB/s in 4s ETA: 0s info: downloading component 'rustfmt' info: removing previous version of component 'rls' info: removing previous version of component 'rust-analysis' info: removing previous version of component 'rust-src' info: removing previous version of component 'cargo' info: removing previous version of component 'clippy' info: removing previous version of component 'rust-docs' info: removing previous version of component 'rust-std' info: removing previous version of component 'rustc' info: removing previous version of component 'rustfmt' info: installing component 'rls' info: installing component 'rust-analysis' info: installing component 'rust-src' info: installing component 'cargo' info: installing component 'clippy' info: installing component 'rust-docs' 19.4 MiB / 19.4 MiB (100 %) 1.2 MiB/s in 28s ETA: 0s info: installing component 'rust-std' 23.7 MiB / 23.7 MiB (100 %) 9.7 MiB/s in 10s ETA: 0s info: installing component 'rustc' 55.6 MiB / 55.6 MiB (100 %) 11.3 MiB/s in 4s ETA: 0s info: installing component 'rustfmt' info: checking for self-updates stable-x86_64-pc-windows-msvc updated - rustc 1.59.0 (9d1b2106e 2022-02-23) (from rustc 1.58.1 (db9d1b20b 2022-01-20)) info: cleaning up downloads & tmp directories C:\Users\karldev> |
There you go! Easy, right? Use the rustup command with the update sub-command when there are new Rust updates for Windows.