4 ms·
I do a lot of Go development on lots of ARM boards and I find that on the Raspberry Pi (the 512M model anyway) the Go compiler is quick enough on the actual dev
by georgemcbay 14y ago
I do a lot of Go development on lots of ARM boards and I find that on the Raspberry Pi (the 512M model anyway) the Go compiler is quick enough on the actual device that there's not much point to cross-compiling, at least if you're running Raspbian/Linux (based on Dave Cheney's post here it sounds like things aren't quite as nice in FreeBSD due to various kernel issues).
On my old chumby boards, though, which are hamstrung for memory, I do cross-compile (in Windows!) and then rsync the resulting binary over, which is a much quicker turn around than compiling on the device and yes, the cross-compile system in Go is absolutely delightful compared to C/C++ toolchain hell.
- jlgreco 14y agoFor me cross-compiling for the Pi is mostly a matter not wanting to bother keeping my development setup on my regular laptop and my Pi in sync. I have a makefile now that go-installs' an x86 build on my laptop, scp's an arm build to my Pi, and builds/verifies a couple of datafiles. So basically I can press F9 on my laptop and have updated binaries on my laptop and Pi in about a second. I could just ssh into the Pi and build there, but it would actually be more of a hassle than cross compiling; an impressive feat.