Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » cross-compiling rust from linux to windows
- kccuber
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
also, sidenote: I'm trying to justify the 100+ MB install to myself so I looked the biggest pc games and apparently Call of Duty: Modern Warfare is 200+ GB?!oh thank gosh i dont play or have any interest in that game because RIP my 10mbps internet, it would take like 4 days to download it
- ScratchCatHELLO
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
also, sidenote: I'm trying to justify the 100+ MB install to myself so I looked the biggest pc games and apparently Call of Duty: Modern Warfare is 200+ GB?!oh thank gosh i dont play or have any interest in that game because RIP my 10mbps internet, it would take like 4 days to download it
yes
that's about half of my computer's disk space
- ScratchCatHELLO
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
would the windows user need to have mingw-related libraries installed for this to work?
bump
- ScratchCatHELLO
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
would the windows user need to have mingw-related libraries installed for this to work?
bump
bump
- ScratchCatHELLO
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
would the windows user need to have mingw-related libraries installed for this to work?
bump
bump
bump
and now for something completely different.

”Huge”.c
- Retr0id
-
Scratcher
68 posts
cross-compiling rust from linux to windows
https://stackoverflow.com/a/62853319/4454877I know I have to install a toolchain (or two) to do that, but is there anything else I need to do?
do I have to do anything else (eg. install mingw) to do that?
“you only need rustup, cargo and your distribution's mingw-w64”
would the windows user need to have mingw-related libraries installed for this to work?No, they get statically linked during build.
Last edited by Retr0id (Aug. 31, 2021 08:46:51)
- ScratchCatHELLO
-
Scratcher
1000+ posts
cross-compiling rust from linux to windows
https://stackoverflow.com/a/62853319/4454877I know I have to install a toolchain (or two) to do that, but is there anything else I need to do?
do I have to do anything else (eg. install mingw) to do that?
“you only need rustup, cargo and your distribution's mingw-w64”
I’ve got that part
would the windows user need to have mingw-related libraries installed for this to work?No, they get statically linked during build.
ok, good
but how do I statically build a rust binary?
- Smitop
-
Scratcher
100+ posts
cross-compiling rust from linux to windows
but how do I statically build a rust binary?Rust binaries are always statically linked against Rust dependencies. (Rust does not (and probably will never) support dynamic linking against other Rust crates.) I think it should just work with a normal
cargo build
- Discussion Forums
- » Advanced Topics
-
» cross-compiling rust from linux to windows



