4 ms·
One thing people never seem to mention is how dead simple it is to cross-compile Go code. For me to consider Nim or Rust, I need to know that I can do something
by wtf_is_up 12y ago
One thing people never seem to mention is how dead simple it is to cross-compile Go code. For me to consider Nim or Rust, I need to know that I can do something as simple as GOARCH=arm GOOS=linux go build.
- twic 12y agoCross-compilation looks pretty simple in Nim: http://nim-lang.org/nimc.html#cross-compilation http://nim-lang.org/nimc.html#cross-compilation Since Nim uses C as an intermediate representation, cross-compilation support should be as good as your C compiler's. Rust's cross-compilation seems to not be that great at the moment. Although i believe that's because it hasn't been done yet, rather than having been done badly.
- steveklabnik 12y agoRust's cross-compilation works, but it's not as easy as it could be. One issue is that you need a cross-compiled version of the standard library lying around.
- __david__ 12y agoIsn't that an issue with every compiled language? I remember always having to cross-compile newlib when I set cross-compiled gcc environments.
- steveklabnik 12y agoIt's true, but you can make this easier or harder, depending. We don't make it particularly easy. It's a mater of polish.
- Matthias247 12y agoFor Go you don't. I found it quite awesome when I could cross-compile something for my raspberry-pi from a Windows PC.
- __david__ 12y agoDoes this mean they ship with the cross compiled libraries installed?
- sesutton 12y agoCross compiling Nim is also dead simple. I even managed to compile for an unsupported Unix with very minimal knowledge of Nim.
- vanderZwan 12y agoOn the other hand, if you run "an unsupported Unix" that implies you are a bit more tech-savvy (and willing to put in the effort) than most when it comes to these issues.