say up front
- First of all, I am an entry-level player in rust. I used to write rust in wsl, and suddenly I want to install rust under windows.
- windows version: windows11 22H2
- original
- change source
Mental journey
-
I fell into silence when I saw the tutorial,
(official recommendation)
-
When I opened it
Microsoft C++ Build Tools
, I was puzzled. This is what made me install vs studio?
-
I install a rust, how many G environments do you want me to install?
Goodbye, farewell! I am a rookie! -
Wait, isn't there a second way?
-
Ok, although the download is bumpy, at least MSYS2 is installed; let me see what to do next,
after installation, configure the system variables
-
Then, move! (Stuck in the download, it should be a network problem, after a few interviews, it will be fine again)
$ curl https://sh.rustup.rs -sSf | sh info: downloading installer
-
After that, just follow the tutorial, but the waiting process here still depends on the network environment. After installing it three times, the download speed was only 40KB/s once (the mentality exploded)
-
Well, now is it possible to be happy
cargo run
? want peach!error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1 |
I. . .
-
open
MSYS2 MINGW64
,pacman -S mingw-w64-x86_64-gcc
-
ok now you can have fun
cargo run
PS E:\xxx> cargo run --release Compiling eframe_template v0.1.0 (E:\xxx) Finished release [optimized] target(s) in 0.86s Running `target\release\eframe_template.exe`
Make complaints
rust
The Windows environment is definitely the most troublesome installation of the language environment I have encountered so far.