Run a single Gox command in your Go project to produce ready-to-ship binaries for Windows, macOS, and Linux at the same time.
Speed up a release build by letting Gox compile all platform targets in parallel across your CPU cores.
Narrow the output to only the OS and architecture pairs you care about by passing flags on the command line.
Gox is a small command-line tool for Go developers who want to build their program for many operating systems and processor types at once. Normally, compiling a Go program produces a single executable that only works on the computer you built it on. Gox lets you produce executables for Windows, macOS, Linux, FreeBSD, and several other platforms in a single command, without needing a separate machine for each. The tool is intentionally minimal. It works almost identically to Go's built-in build command, so anyone already familiar with building Go programs can use Gox immediately. You run it in your project folder, optionally specify which operating systems or processor architectures you care about, and Gox handles the rest. By default it targets every platform Go supports. One practical advantage is that Gox runs multiple builds at the same time, using as many CPU cores as your machine has available. If you need binaries for eight platforms, it does not build them one after the other, it runs them in parallel and finishes faster. The output is a set of separate executable files, one per platform, with no enforced folder structure imposed on you. You can narrow the output in straightforward ways. Passing a flag for a specific operating system produces only those binaries. Passing a combined operating system and architecture value gives you exactly one build. The tool has a help flag that lists all available options. Gox is squarely aimed at situations where you want the simplest possible cross-compilation without extra features like package uploading, changelog generation, or installer creation. If you need those extras, other tools in the Go ecosystem cover them. Gox just compiles and stops there.
← mitchellh on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.