Rust on Windows

A slightly easier install with Scoop

The other day I wanted to try Rust on Windows but found it wasn't very straightforward.

I downloaded the GUI installer, clicked through it, typed rust, and got nothing but an exit code of -1073741515. Returning to the quick start I saw a note that I hadn't noticed the first time, mentioning that I need MinGW as well. But, which parts, and which version? It wasn't very clear to me.

So I've come up with this quick-start guide of my own, using Scoop. It makes use of Innounp to extract the contents of Rust's Inno Setup installer, thereby bypassing the UAC permissions popup and GUI stuff.

Here it is, my setup script to get started with Rust on Windows:

UPDATE: This script can be simplified now that Scoop auto-installs dependencies—just install Scoop and then run scoop install rust.

Now when you type rust, you should see some helpful information about the commands you can use. You might want to check out the Rust tutorial at this stage.

Taking it Further: Building Rust on Windows

After I had Rust working, I wanted to see if I could improve on the guide to building it on Windows. I think what I came up with is slightly easier to follow, especially if you're new to MinGW / MSYS like I am.

Note: you don't need to do this if you just want to use Rust—this is only for when you want to hack on Rust itself.

scoopinstallgcc45msyspython27msys# a new MSYS command prompt should open: switch to that# get the Rust source codegitclonegit://github.com/mozilla/rust.gitcdrust# make sure configure can find PythonexportPATH=$PATH:~AppData/local/scoop/apps/python27/2.7.5# these steps can take a while, and use ~2GB disk space./configuremakemakeinstall# and you're done

I didn't have much time to play around with Rust after all that, but it looks interesting. I hope this guide makes it easier for someone else to try it out!