Discuss Scratch

kccuber
Scratcher
1000+ posts

cross-compiling rust from linux to windows

ScratchCatHELLO wrote:

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

kccuber wrote:

ScratchCatHELLO wrote:

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

ScratchCatHELLO wrote:

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

ScratchCatHELLO wrote:

ScratchCatHELLO wrote:

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

ScratchCatHELLO wrote:

ScratchCatHELLO wrote:

ScratchCatHELLO wrote:

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

ScratchCatHELLO wrote:

Retr0id wrote:

https://stackoverflow.com/a/62853319/4454877

ScratchCatHELLO wrote:

I 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”

ScratchCatHELLO wrote:

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

Retr0id wrote:

ScratchCatHELLO wrote:

Retr0id wrote:

https://stackoverflow.com/a/62853319/4454877

ScratchCatHELLO wrote:

I 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

Retr0id wrote:

ScratchCatHELLO wrote:

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

ScratchCatHELLO wrote:

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
No special compiler flags needed. (although I haven't tested it)

Powered by DjangoBB