-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-compiling on windows: howto #28
Comments
Cross compiling for i686-pc-windows-msvc from x86_64-pc-windows-msvc should be done just as any other cross compilation. Assuming rustup is installed (highly recommended)
|
@Emilgardis Yeah, but what I asked is adding this kind of thing, or this link, to the document. |
https://github.com/japaric/rust-cross#the-target-triple https://github.com/japaric/rust-cross#cross-compiling-with-rustc https://github.com/japaric/rust-cross#cross-compiling-with-cargo How do those not explain how to cross-compile for different targets? (I am sorry if I sound rude, I'm just trying to understand what you want to improve on) |
@Emilgardis If what I said made you feeling offensive, please accept my apologize here. Maybe I didn't express well what I mean. Let me try to explain it in another way: Basically here I think we could add some detailed tutorial for the user, for example:
I think this is helpful for newbies (like me). |
That does seem like something that is missing. Maybe a more general example could be done or the TL;DR could be generalized for any (supported) target. |
Cross compiling from Win32 to Win64 (or vise versa) is easy, to some extent:
Sometimes you may need to check the portability of your binary if some asm/C/C++ code is involved, in other situations these steps just work. However, in Linux/macOS world, things may different. |
When I run rustup on Windows it warns that I need to install C++ build tools, which I might get from Visual Studio. When I install Visual Studio, I can choose 2 packages: Windows development with C++ and Linux development with C++. If I install both, would it be possible to build binaries for linux on windows? |
Recently I want to compile something to a specific windows target. My development environment is Win10 64-bit, VS 2015 Update 3, with x86_64-pc-windows-msvc rustc/cargo/stdlib. I want to compile my crate for a 32-bit windows environment. Since VS contains both 32-bit and 64-bit linker, I think cross compiling from 64-bit Windows host to 32-bit Windows target is possible. However I don't find something helpful in this repository.
Since the purpose of this repository is
, I think adding some document will help those people who is in the same situation with me.
The text was updated successfully, but these errors were encountered: