Web presence of Neil O'Toole.


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 and oh-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 for sq, 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 of sq, and so off to the farm with xcgo. 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 to sq