How can i install rust in windows, without using, Visual Studio.
I've already seen post using mingw_64 but it wasn't very clear...
Thanks for reading :)
How to install rust?
How to Install rust and MinGW64 on Windows 10
How to install Rust via CLI on Windows? - Stack Overflow
proxy - How can I install Rust using rustup on Windows when behind a firewall? - Stack Overflow
What is rustup?
rustup is an installer for the Rust programming language. It manages Rust versions and associated tools.
How do I install Rust on Windows?
To install Rust on Windows, follow these steps:
- Open your web browser and go to the official Rust website: https://www.rust-lang.org.
- Click on the \"Get Started\" button.
- Download the rustup-init.exe file.
- Run the downloaded rustup-init.exe file.
- Follow the on-screen instructions to complete the installation process.
What is Rust?
Rust is a systems programming language focused on safety, speed, and concurrency. It is designed to be a safe alternative to languages like C and C++
Videos
Hey I’m a newbie and I’m using vscode, I installed the officially extension but uninstalled it due to seeing post that it’s bad, what do I use to run rust? I’ve installed it in the command line already.
Install it with scoop for easier package management on your system with a single command:
GNU toolchain
scoop install rustup-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
or
scoop install rustup for MSVC toolchain
Then you can update rustup or uninstall it whenever you want with:
scoop upgrade rustup
scoop uninstall rustup.
Follow directions in Other ways to install rustup. Download rustup-init.exe based on the target toolchain of your choice:
- 64-bit MSVC: x86_64-pc-windows-msvc/rustup-init.exe
- 64-bit GNU: x86_64-pc-windows-gnu/rustup-init.exe
- 32-bit MSVC: i686-pc-windows-msvc/rustup-init.exe
- 32-bit GNU: i686-pc-windows-gnu/rustup-init.exe
You can use --help to see what options there are to configure the installation:
> .\rustup-init.exe --help
rustup-init 1.24.3 (ce5817a94 2021-05-31)
The installer for rustup
USAGE:
rustup-init.exe [FLAGS] [OPTIONS]
FLAGS:
-v, --verbose Enable verbose output
-q, --quiet Disable progress output
-y Disable confirmation prompt.
--no-update-default-toolchain Don't update any existing default toolchain after install
--no-modify-path Don't configure the PATH environment variable
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--default-host <default-host> Choose a default host triple
--default-toolchain <default-toolchain> Choose a default toolchain to install
--profile <profile> [default: default] [possible values: minimal, default, complete]
-c, --component <components>... Component name to also install
-t, --target <targets>... Target name to also install
The basic -y should work for you; it will install rustup and the default toolchain. You can of course use wget to download the installer within a script.
> wget https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe
> .\rustup-init.exe -vy
Note, the MSVC toolchain will require you to install the Visual C++ Build Tools to function. I'm unsure how to install those in a CLI only environment. Hopefully the .exe for that functions similarly.
See also:
- What are the differences between the GNU and MSVC Rust toolchain?
- How to install Visual C++ Build tools?
I followed aSpex's advice...
- Go to https://www.rust-lang.org/ -> Install
Download rustup-init.exe to ~/Downloads
In powershell:
$proxy='http://<IP>:<PORT>' $ENV:HTTP_PROXY=$proxy $ENV:HTTPS_PROXY=$proxy cd ~\Downloads .\rustup-init.exe
I have tested two solutions that were suggested as comments above, and both worked. Thanks, kennytm and ljedrz!
Suggested by kennytm, add the following line to the hosts file in c:\Windows\System32\drivers\etc
13.32.244.72 static.rust-lang.org
Suggested by ljedrz, use a standalone installer. In the past, one could easily find those standalone installers, but with the latest reorg of the rust language site, the only thing really pops out initially is the rustup-init.exe. However as @ljedrz pointed out in his comment above, those standalone installers still exist and can be found here: standalone installers for various platforms.