[SOLVED] Dual windows installs?


#1

I have rust installed on my windows machine via rustup, and it uses the MSVC linker. I would like to try using gtk-rs, but that requires MSYS2 and GTK (which I already have). Can I install rust again on windows via rustup and the MSYS shell without a conflict with the already installed version?


#2

According to http://gtk-rs.org/docs/requirements.html, you only need the GNU ABI installed, so I think you can get away with installing it. I haven’t tried this out myself though.

To do so, you’d do

rustup toolchain add x86_64-pc-windows-gnu

or

rustup toolchain add i686-pc-windows-gnu

and the pass along the right --target when you build.

Maybe try that?


#3

Thanks Steve, I did try to install rustup again through the MSYS2 prompt. It wanted to install it in the same location I already had rust installed. So I guess it does not treat rust as an MSYS2 application like gcc and binutils. It looks like I’ll just need to add the toolchain to my current installation like you suggested, and then make sure to pass the location of my MSYS2/pacman managed libraries to the linker.

This will be my first time using Rust and needing to link to an external C lib.

Thanks again.


#4

And I’m running GTK+ sample programs built with cargo on windows. Thanks!