- Notifications
You must be signed in to change notification settings - Fork1
A dead simple, no frills Go cross compile tool
License
ctdk/gox
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Gox is a simple, no-frills tool for Go cross compilation that behaves alot like standardgo build
. Gox will parallelize builds for multipleplatforms. Gox will also build the cross-compilation toolchain for you.
To install Gox, please usego get
. We tag versions so feel free tocheckout that tag and compile.
$ go get github.com/mitchellh/gox...$ gox -h...
If you know how to usego build
, then you know how to use Gox. Forexample, to build the current package, specify no parameters and justcallgox
. Gox will parallelize based on the number of CPUs you haveby default and build for every platform by default:
$ goxNumber of parallel builds: 4--> darwin/386: github.com/mitchellh/gox--> darwin/amd64: github.com/mitchellh/gox--> linux/386: github.com/mitchellh/gox--> linux/amd64: github.com/mitchellh/gox--> linux/arm: github.com/mitchellh/gox--> freebsd/386: github.com/mitchellh/gox--> freebsd/amd64: github.com/mitchellh/gox--> openbsd/386: github.com/mitchellh/gox--> openbsd/amd64: github.com/mitchellh/gox--> windows/386: github.com/mitchellh/gox--> windows/amd64: github.com/mitchellh/gox--> freebsd/arm: github.com/mitchellh/gox--> netbsd/386: github.com/mitchellh/gox--> netbsd/amd64: github.com/mitchellh/gox--> netbsd/arm: github.com/mitchellh/gox--> plan9/386: github.com/mitchellh/gox
Or, if you want to build a package and sub-packages:
$ gox ./......
Or, if you want to build multiple distinct packages:
$ gox github.com/mitchellh/gox github.com/hashicorp/serf...
Or if you want to just build for linux:
$ gox -os="linux"...
Or maybe you just want to build for 64-bit linux:
$ gox -osarch="linux/amd64"...
And more! Just rungox -h
for help and additional information.
A big thanks to these other options for existing. They each paved theway in many aspects to make Go cross-compilation approachable.
Dave Cheney's golang-crosscompile -Gox compiles for multiple platforms and can therefore easily run onany platform Go supports, whereas Dave's scripts require a shell. Goxwill also parallelize builds. Dave's scripts build sequentially. Gox hasmuch easier to use OS/Arch filtering built in.
goxc -A very richly featured tool that can even do things such as build systempackages, upload binaries, generate download webpages, etc. Gox is asuper slim alternative that only cross-compiles binaries. Gox builds packages in parallel, whereasgoxc doesn't. Gox doesn't enforce a specific output structure for builtbinaries.
About
A dead simple, no frills Go cross compile tool
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- Go100.0%