Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Cross-compilation looks pretty simple in Nim:

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.


Rust'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.


Isn't that an issue with every compiled language? I remember always having to cross-compile newlib when I set cross-compiled gcc environments.


It's true, but you can make this easier or harder, depending. We don't make it particularly easy. It's a mater of polish.


For Go you don't. I found it quite awesome when I could cross-compile something for my raspberry-pi from a Windows PC.


Does this mean they ship with the cross compiled libraries installed?


Cross compiling Nim is also dead simple. I even managed to compile for an unsupported Unix with very minimal knowledge of Nim.


On 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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: