Skip to content

glauth/xgo

This branch is 1 commit ahead of, 15 commits behind crazy-max/xgo:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f0e8624 · Nov 16, 2024
Aug 16, 2024
Jun 25, 2024
Jun 25, 2024
May 10, 2024
Jan 8, 2023
Mar 12, 2021
Mar 15, 2021
Jan 8, 2023
Aug 16, 2024
Feb 19, 2024
Nov 16, 2024
Apr 8, 2023
Aug 23, 2021
Nov 16, 2024

Repository files navigation

GitHub release Total downloads Build Status Test Status Docker Stars Docker Pulls Go Report Card

Become a sponsor Donate Paypal


Fork again

This repository is a fork of crazy-max/xgo (see below) with the added ability to run a command before building. This is particularly useful when building a target that has some package dependencies that are not already installed in the docker images used by xgo.

Here is an example of how to build a target that depends on libpam0g-dev, used in GLauth's build toolchain:

xgo --targets linux/amd64 --preparecmd "apt-get update && apt-get install -y libpam0g-dev" github.com/GLauth/glauth

Fork

This repository is a fork of karalabe/xgo to push images and tags to a single docker repository on several registries to make things more consistent for users. It uses goxx image as base that provides all the necessary Go tool-chains, C/C++ cross-compilers and platform headers/libraries.

Registry Image
Docker Hub crazymax/xgo
GitHub Container Registry ghcr.io/crazy-max/xgo
$ docker run --rm mplatform/mquery crazymax/xgo:latest
Image: crazymax/xgo:latest
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm64

This also creates a standalone xgo executable that can be used on many platforms.

Build

Build xgo yourself using Docker buildx bake:

git clone https://github.com/crazy-max/xgo.git xgo
cd xgo

# Build xgo image and output to docker with xgo:local tag
docker buildx bake

# Tests
BASE_IMAGE=xgo:local docker buildx bake test-c
BASE_IMAGE=xgo:local docker buildx bake test-cpp
BASE_IMAGE=xgo:local docker buildx bake test-gorm

# Create xgo artifacts in ./dist
docker buildx bake artifact-all

Documentation

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! 🙏

License

MIT. See LICENSE for more details.

Releases

No releases published

Packages

No packages published

Languages

  • Shell 64.8%
  • Go 26.1%
  • Dockerfile 6.1%
  • HCL 2.7%
  • Other 0.3%