logoalt Hacker News

necovek12/07/20253 repliesview on HN

This seems to imply that Go's binaries are otherwise compatible with multiple platforms like amd64 and arm64, other than the issue with linking dynamic libraries.

I suspect that's not true either even if it might be technically possible to achieve it through some trickery (and why not risc-v, and other architectures too?).


Replies

khazit12/07/2025

Of course you still need one binary per CPU architecture. But when you rely on a dynamic link, you need to build from the same architecture as the target system. At that point cross-compiling stops being reliable.

show 3 replies
cxrlast Saturday at 3:57 AM

For a single binary that will actually run across both architectures, see <https://cosmo.zip/>.

Original discussion: <https://news.ycombinator.com/item?id=24256883>.