3 ms·
Rust tends to be harder than Go for a few reasons, but they all sort of boil down to this: Go has created its own little world, which means that it makes cross
by steveklabnik 6y ago
Rust tends to be harder than Go for a few reasons, but they all sort of boil down to this: Go has created its own little world, which means that it makes cross compiling easier. Rust tends to work directly with the system, which means that cross compiling is harder.
For example, a lot of Rust projects are totally fine wrapping a C library to get the job done. This means you don’t just need Rust set up to cross compile, but also C. There’s a very strong push for pure-Go code bases in Go for this reason. Go also attempts to not use libc if possible, though they’ve weakened that a bit over the years. We use the system linker, and so cross compiling to x86_64-pc-windows-msvc is tough, because link.exe won’t run outside of Windows, for example.
That being said, some combinations are easy. Compiling to embedded targets is a piece of cake, as the other comment explains. Cross compiling between UNIXes is easy, and cross compiling to Linux is easy.
- apatheticonion 6y agoThis makes a lot of sense, thanks!