Hacker News new | past | comments | ask | show | jobs | submit login

AFAIK Go has one of, if not the easiest cross compilation stories.

This is all it takes to build a linux arm64 binary:

  env GOOS=linux GOARCH=arm64 go build your_program
You can even run that from Windows and it will just work.

This is how you list all possible targets:

  go tool dist list
If you want to generate binaries for many linux distros, you can even use a simple bash script:

  #!/usr/bin/bash
  archs=(amd64 arm64 ppc64le ppc64 s390x)

  for arch in ${archs[@]}
  do
    env GOOS=linux GOARCH=${arch} go build -o your_program_${arch}
  done





thats definitely not the commands the guide i looked at had lol

looks on par with rust then. go is the next one for me to dive into when im doing fiddling with rust audio stuff.

regardless, wouldn’t have worked at last job as no-one knew go either. would have been easier probably to get someone in, but i spent a year trying to get one new hire to no avail, so doubtful.


fair enough

Asterisk: As long as it is pure Go code.



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

Search: