xcgo
xcgo is a maximalist Docker image for cross-compiling and
releasing/distributing CGo-enabled Go/Golang applications. At this time, it can build and distribute
macOS, Windows and Linux CGo projects for arch amd64
.
xcgo
has what gophers crave:
go 1.14
OSX SDK
Catalina /macOS 10.15
docker
snapcraft
goreleaser
golangci-lint
mage
zsh
andoh-my-zsh
- and a bunch of other stuff.
Start at the neilotoole/xcgo repo, and
then head over to the wiki.
The neilotoole/xcgo
images are published to Docker Hub.
There’s also a companion example project (neilotoole/sqlitr) that was
created explicitly to exhibit xcgo
: it demonstrates pretty much the entire array of xcgo
’s capabilities,
showing how to release to brew
, scoop
, snap
, Docker Hub, GitHub, etc.
UPDATE 2023-09-22:
xcgo
was created as a toolchain element forsq
, with its many target architectures. At the time, there really wasn’t anything else that covered all the bases. However, recent releases of GoReleaser plus GitHub workflows are now able to satisfy the needs ofsq
, and so off to the farm withxcgo
. It’s still a totally viable project, but it requires a decent chunk of work to add Apple Silicon support, and ongoing work for each Go, OS, and misc tool release. That’s time I’d rather devote tosq