Skip to content

Instantly share code, notes, and snippets.

@justinhj
Last active August 23, 2021 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinhj/b2a1690e2e99e0bb9362b9f7885eca4d to your computer and use it in GitHub Desktop.
Save justinhj/b2a1690e2e99e0bb9362b9f7885eca4d to your computer and use it in GitHub Desktop.
How to do Rust on Windows with Gnu tools
Follow these instructions after you have Rustup, Scoopy and cmder installed.
https://jrhawley.ca/2020/05/25/rust-toolchain-windows
One extra bit of info is to set the path in cmder follow these instructions
https://jonathansoma.com/lede/foundations-2019/terminal/adding-to-your-path-cmder-win/
Find msys in the scoop folder and add the path, mine was here...
set PATH=C:\Users\justi\scoop\apps\msys2\current\usr\bin;%PATH%
set PATH=C:\Users\justi\scoop\apps\msys2\current\mingw64\bin;%PATH%
Not sure about the order this needs to be done in but you must set the default target
rustup target add gnu
Then you can install
rustup toolchain default stable-gnu
rustup toolchain default nightly-gnu
Now you should be able to build and run rust.
WINDOWS
Install the SDK C++ tools
set the path for the linker
set PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x86";%PATH%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment