forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Using Rust on Windows
Brian Anderson edited this page Jan 10, 2014
·
10 revisions
As of release 0.9, Rust still depends on GCC for platform linker and C runtime libraries, so you will need to install one before installing Rust itself. Follow these instructions to set up the environment, then run the installer.
The standard way of running Rust on Windows is via the MinGW/MSYS environment:
- Click "Downloads" at the top of the page, download and run mingw-get-setup.exe.
- Once package manager window opens, check the "mingw32-base" option.
- Optionally, check "msys-base" to install MSYS shell.
- Apply changes (Installation/Apply Changes).
- If you installed MSYS, launch MSYS shell,
<mingw>\msys\1.0\msys.bat
, typesh /postinstall/pi.sh
, and answer the questions. - Use Rust compiler from MSYS shell (bonus: rustc will output colored error messages!). Or, simply add
<mingw>\bin
to your PATH and use it from the Windows Command Prompt.
For the absolutely minimal installed footprint, don't mark any packages for installation, but simply run mingw-get install gcc
from the command prompt.
If you are feeling a bit adventurous, you may also try using a standalone MinGW GCC distribution such as mingw-builds:
- Download and run mingw-builds-install.exe.
- Choose installation options: architecture=x32, threads=posix, exceptions=dwarf.
- Use Rust compiler from mingw-builds terminal (there will be a shortcut in the Start menu), or add
<mingw-builds>\mingw32\bin
directory to your PATH.
Now just run the installer.