4 ms·
When cross compiling pure Go you set an environment variable, build, and you have a binary ready to run, it is trivial. When cross compiling with cgo you need
by steeleduncan 4y ago
When cross compiling pure Go you set an environment variable, build, and you have a binary ready to run, it is trivial.
When cross compiling with cgo you need a C cross compiling toolchain for the target platform installed with the right libc, etc. It is not impossible and that is how C/C++ is always cross compiled, but it is much more hassle than compiling pure Go.