Categorygithub.com/PerpetualCreativity/go-create
repositorypackage
0.0.0-20240108173019-a093db570319
Repository: https://github.com/perpetualcreativity/go-create.git
Documentation: pkg.go.dev

# README

go-create

An easy-to-use, concurrent cross-compilation wrapper around go build.

Installation

go install github.com/PerpetualCreativity/go-create@latest

Usage

asciicast

Explanation

go-create --name NAME --file main.go --compress --output=builds --exclude js android

This builds main.go for all OSs and architectures Go supports, except for JavaScript and Android. An example output filename is ./builds/NAME-linux-amd64.

Flags

flagdefaultwhat it does
--namenone, flag requiredspecify name of builds
--filemain.gospecify file to build
--compressfalsecompress output
--output. (current directory)directory to place builds
--first-classfalseinclude platforms with first-class Go support
--cgofalseinclude platforms with Cgo support
--excludefalsesee below

--exclude

Normally, when running go-create, adding OSs at the end of the incantation will build for those OSs only. For example, if you only want to build for Linux and Darwin (macOS):

go-create --name [name here] linux darwin

But if you specify --exclude, you will get builds for every OS Go supports except for those at the end of the incantation. For example, if you want to build for everything except JavaScript (WebAssembly) and Android:

go-create --name [name here] --exclude js android

You can access a list of OSs and architectures that your Go installation supports using go tool dist list.