Rustのバージョンアップ

miseなどのversion managerは使用しないでrustupのみを使用する。


現状のrustc versionの確認

$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)


rust-toolchain.toml

[toolchain]
channel = "1.85.0"


これを、update後のRust versionに書き換える。

[toolchain]
channel = "1.94.0"


ターミナルで以下を実行

$ rustup update


directory overrideをしている場合はrustup updateのみではRust versionが更新されないため確認を行う。

$ rustup show
Default host: aarch64-apple-darwin
rustup home: /Users/papi/.rustup

installed toolchains
--------------------
stable-aarch64-apple-darwin
1.78.0-aarch64-apple-darwin
1.85.0-aarch64-apple-darwin (active)
1.94.0-aarch64-apple-darwin (default)

active toolchain
----------------
name: 1.85.0-aarch64-apple-darwin
active because: directory override for '/Users/papi/workspace/papi_server'
installed targets:
aarch64-apple-darwin


directory override設定を解除する。

$ rustup override unset
info: override toolchain for '/Users/papi/workspace/papi_server' removed


$ rustc --version
rustc 1.94.0 (4a4ef493e 2026-03-02)


https://doc.rust-lang.org/book/ch01-01-installation.html#updating-and-uninstalling

Related Articles