mieki256's diary



2026/07/07(火) [n年前の日記]

#2 [rust] RustをWindows11にインストールしておいた

プログラミング言語の Rust を Windows11 x64 25H2 にインストールしておいた。今回は Rust 1.96.1 がインストールされた。

一旦 rustup self uninstall でアンインストールしてから、rustup-init.exe を実行してインストールした。

作業手順については以前メモしてあった。

_mieki256's diary - Rustで使えるGUIライブラリを調べてる
_mieki256's diary - RustをWindows10にインストール
_mieki256's diary - RustをWindows10にインストール

利用するには C++コンパイラが必要らしいけど、Visual Studio Community 2022 をインストールしてある環境だからそのあたりはクリアしているだろう…。たぶん。

インストール場所を変更したいので、環境変数を指定しておく。事前に環境変数を指定しておくと、その場所にインストールしてくれるらしい。
入手した rustup-init.exe 64bit版を実行すると以下のメッセージが表示された。

warn: It looks like you have an existing rustup settings file at:
warn: D:\Rust\.rustup\settings.toml
warn: Rustup will install the default toolchain as specified in the settings file,
warn: instead of the one inferred from the default host triple.

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  D:\Rust\.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  D:\Rust\.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  D:\Rust\.cargo\bin

This path will then be added to your PATH environment variable by
modifying the PATH registry key at HKEY_CURRENT_USER\Environment.

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

urrent installation options:


   default host triple: x86_64-pc-windows-msvc
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation
>

1を選択してインストール処理を進める。色々なファイルがダウンロードされてインストールされていく。

rustc 1.96.1 がインストールされた、と表示された。

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload its PATH environment variable to include
Cargo's bin directory (D:\Rust\.cargo\bin).

Press the Enter key to continue.

Enterを叩けばコンソールが終了して、環境変数PATHに cargo関連ツールのパスが追加される。ユーザ側の環境変数 PATH に追加された模様。追加というか、PATH の一番最初に挿入されてるけれど…。

インストール場所やバージョンを確認。
> where cargo
D:\Rust\.cargo\bin\cargo.exe

> where rustup
D:\Rust\.cargo\bin\rustup.exe

> cargo --version
cargo 1.96.1 (356927216 2026-06-26)

> rustup --version
rustup 1.29.0 (28d1352db 2026-03-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: the currently active `rustc` version is `rustc 1.96.1 (31fca3adb 2026-06-26)`

以上です。

過去ログ表示

Prev - 2026/07 -
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

カテゴリで表示

検索機能は Namazu for hns で提供されています。(詳細指定/ヘルプ


注意: 現在使用の日記自動生成システムは Version 2.19.6 です。
公開されている日記自動生成システムは Version 2.19.5 です。

Powered by hns-2.19.6, HyperNikkiSystem Project