Rust 每隔一段时间就会有新的版本发布,若要将已安装的 Rust 更新到最新版,不用卸载旧的版本,使用rustup工具即可完成升级;

查看Rust版本

可以使用rustc -V命令查看当前安装的 Rust 版本:

rustc -V
rustc 1.88.0 (6b00bc388 2025-06-23)

更新Rust

可以使用rustup update命令更新 Rust,该命令会更新所有已安装的工具链(stable、beta、nightly);

rustup update

如果只更新稳定版,可以运行:

rustup update stable

看到类似以下信息表示更新完成:

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2026-03-05, rust version 1.94.0 (4a4ef493e 2026-03-02)
info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
info: downloading component 'rust-src'
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
 66.5 MiB /  66.5 MiB (100 %)  35.3 MiB/s in  1s
info: downloading component 'rustfmt'
  2.5 MiB /   2.5 MiB (100 %) 107.2 KiB/s in 23s
info: removing previous version of component 'rust-std' for 'wasm32-unknown-unknown'
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 'rust-std' for 'wasm32-unknown-unknown'
 20.6 MiB /  20.6 MiB (100 %)   8.6 MiB/s in  5s
info: installing component 'rust-src'
  3.6 MiB /   3.6 MiB (100 %)   3.2 MiB/s in  1s
info: installing component 'cargo'
  9.6 MiB /   9.6 MiB (100 %)   6.9 MiB/s in  3s
info: installing component 'clippy'
info: installing component 'rust-docs'
 20.6 MiB /  20.6 MiB (100 %)   2.1 MiB/s in 18s
info: installing component 'rust-std'
 21.3 MiB /  21.3 MiB (100 %)   7.0 MiB/s in  2s
info: installing component 'rustc'
 66.5 MiB /  66.5 MiB (100 %)   8.1 MiB/s in  8s
info: installing component 'rustfmt'
info: checking for self-update
info: downloading self-update

  stable-x86_64-pc-windows-msvc updated - rustc 1.94.0 (4a4ef493e 2026-03-02) (from rustc 1.88.0 (6b00bc388 2025-06-23))

info: cleaning up downloads & tmp directories