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

That's if they're on the same architecture and operating system as you. Half the people I know are on mac, half of them are on arm. The other half are on windows and x86.


Actually, you can specify to build portable binaries for all 3 of these platforms. You can even make them totally static, so that deployment is as easy as "copy the executable file with windows/Linux/Mac/etc in the name and run it".

This is part of my standard Go build.sh script. You just never know who might want to run a given thing where.


Now I'm having flashbacks to porting a whole stack of applications from x86 to a customized Linux distribution running on a big-endian PC platform. A mishmash of C/C++, Java, Node-JS, Python...

It was really dumb, but that's what the client needed. So much cross compiling.


Go has cross compilation.


Who the heck is on ARM (outside data centers)? But yeah, with golang that's just:

GOOS=linux GOARCH=amd64 go build

GOOS=linux GOARCH=arm64 go build

GOOS=darwin GOARCH=amd64 go build

Which again, let's me distribute a binary to my end user as a single file, without directing them to install java or python3 or whatever.

(The ARM question is kinda immaterial, but I'm curious)


Who the heck is on ARM (outside data centers)?

Mac people, for a few years now.




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

Search: