Cross Compile Windows to Linuw without rustup

I work of a very big financial institution. We recently allowed rust to be used. We are using rust 1.69. It's a "system" install. No rustup. How do I cross compile from Windows to Linux without using rustup? I did do a cargo install cross, but that requires a rustup toolchain. Is there a way to build Linux binaries with my current setup?

Is WSL an option?

Is Docker an option? You could mount the directory in a Linux-docker, compile in Docker without rustup.

Sadly no. Things are very locked down.

The Docker option is a really good one; however, we seem to be about 10 years behind modern technology.

I'm curious to know why organisations make such an absurd diktat?

I can understand wanting to have control of everything being used. Nailing down a "known good" working version compilers and other tools. But surely it is better to do that with rustup and Cargo rather than relying on whatever old junk ones OS packager happens to install.

Anyway, when I was developing Rust on Windows I used the WSL running Debian to great effect for a long time. Never did actually build a Windows executable from Rust.

1 Like

Can you use a CI platform which may have rust installed?

That was my point to the "powers that be." I'm glad we are starting to catch up, even if ever so slightly. The situation is we needed to deploy a "script" to "do stuff." Python is not an option. Deploying a single binary is the best option. I know a little Rust and this would have given me a great opportunity to learn and get real experience. I learn best when I have to build something that will be used and has a real purpose. Our company has strong support for Go, but I never enjoyed programming with Go.
I think I'll try the WSL avenue.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.