Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/goxPublic
forked frommitchellh/gox

A dead simple, no frills Go cross compile tool

License

NotificationsYou must be signed in to change notification settings

ctdk/gox

 
 

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.

Installation

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...

Usage

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.

Versus Other Cross-Compile Tools

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

Packages

No packages published

Languages

  • Go100.0%

[8]ページ先頭

©2009-2025 Movatter.jp