Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRustup on Windows installs incorrect architecture of Rust by default #176
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for the report. Did you expect it to install x86_64-pc-windows-msvc instead of i686-pc-windows-msvc? You can install that toolchain anyway with You got the i686 MSVC toolchain because the way rustup infers parts of the target spec is based off the target of the running exe (which is i686-pc-windows-gnu). We could possibly change the inference to use the architecture of the host platform instead, but I'm not sure that's better - it's long been my impression that 32-bit development is still a safe 'default' for Windows. So what you are seeing is intended behavior, but it's definitely debatable. |
This comment has been minimized.
This comment has been minimized.
|
One of the features I've wanted for a while is for the default host target to be configurable, which would help avoid this problem. |
This comment has been minimized.
This comment has been minimized.
|
I did expect to install Here's where my expectation comes from: My profile executes I see where you're coming from with 32-bit being the default - that's still relatively safe for many Windows users. I don't know what the right answer is here. |
This comment has been minimized.
This comment has been minimized.
|
Actually, I do think we should provide both 32 and 64-bit binaries from www.rustup.rs |
This comment has been minimized.
This comment has been minimized.
|
@Diggsey do you mean a default set up/install path so that people like me who default to 64-bit MSVC would get a 64-bit MSVC Rust by default? |
This comment has been minimized.
This comment has been minimized.
|
@peschkaj The idea is that instead of the host target being hard-coded at compile time (it's currently based off the rust cfg variables) it would be configurable. |
This comment has been minimized.
This comment has been minimized.
Interesting, so we could detect that you are running in a VC console and automatically pick the 'right' toolchain. |
This comment has been minimized.
This comment has been minimized.
|
@brson - absolutely! The It could be confusing if someone were using the VC console for "X64 X86 Cross Build Tools", but even in that case you'll have:
But, yeah, back to your original point - it's totally possible to target the current running environment. Worst case, the user is running in a basic CMD or PowerShell window and then they get whatever the "base" version of Rust is. At that point, 32-bit GCC Rust makes sense. |
This comment has been minimized.
This comment has been minimized.
pravic
commented
Apr 2, 2016
|
I have almost similar question about toolchain resolving: why the default environment is gnu?
|
This comment has been minimized.
This comment has been minimized.
|
@pravic: From a conversation on IRC (I think with @steveklabnik), it's historical. In that same conversation, it was mentioned that the "Install Rust" link might default to MSVC at some point in the future, but these are idle conversations that in no way reflect the future of Rust and I am just an innocent bystander with limited powers. These days, MSVC++ is completely free for open source developers, and the community edition of Visual Studio works just as well, too. |
This comment has been minimized.
This comment has been minimized.
pravic
commented
Apr 3, 2016
|
Is there a way to hack rustup to change target resolving priority? |
This comment has been minimized.
This comment has been minimized.
|
@pravic You can download rustup for other targets from here: https://github.com/rust-lang-nursery/multirust-rs#other-installation-methods |
This comment has been minimized.
This comment has been minimized.
pravic
commented
Apr 3, 2016
|
@Diggsey thanks! It seems, I reinstalled it from rustup.rs with gnu abi:
|
This comment has been minimized.
This comment has been minimized.
starkat99
commented
Apr 11, 2016
|
Adding to this: I installed rustup from my previous multirust install, and I was surprised when it unexpectedly installed i686-gnu instead of x86_64-msvc by default when I simply tried to install "stable" with no additional target info. Unless I'm remembering improperly, my previous usage of multirust it would use msvc by default (or I configured it to do so or something, I don't remember). It's probably best to default to msvc on windows...and probably 64-bit on 64-bit machine, though that's a little less crucial other than 32-bit msvc hasn't been considered stabilized yet. |
This comment has been minimized.
This comment has been minimized.
|
This will be fixed by #421 |
Diggsey
referenced this issue
May 27, 2016
Closed
`cargo build` always compiles 32-bit binaries on windows #503
brson
closed this
Jun 23, 2016
This comment has been minimized.
This comment has been minimized.
|
Host architecture is configurable at install time now. |
peschkaj commentedMar 28, 2016
Using Windows 10 Professional, 64-bit with MSVC installed,
Platformset to "X64", andPROCESSOR_ARCHITECTUREset to "AMD64".Currently, running
rustup default stable-msvc(or even specifying an override) without specifying the architecture installsi686-pc-windows-msvcwhich is incompatible with 64-bit MSVC binaries.Steps to repro: