Skip to content

Metabuild - ZeroConf Build System for cross compilation with 6 compilers and testing built-in as long as you layout your project correctly.

License

Notifications You must be signed in to change notification settings

frinknet/metabuild

Repository files navigation

logo

Metabuild \ˈme-tə-ˌbild\ ● proper nounfr. META-, prefix "beyond, transcending" + BUILD, v. "to construct with great suffering" ● cf. alt. "Make Everything Trivial And Build Universally In Linux Dockerland" (backronym, chiefly among the sleep-deprived) occasionally pseudo-Latin "metabuildicus" — liberation from toolchain tyranny...

  1. A zero-to-hero, cross-platform build cocoon — engineered to spare developers from the Sisyphean torment of dependency management across seventeen different operating systems.

  2. (colloq.) Docker-powered salvation for those who've grown weary of explaining why their code compiles on Tuesday but not Wednesday, or why Jessica's MacBook spawns binaries while Jenkins weeps.

  3. Specialized refuge for the architecturally promiscuous — ARM64 here, WASM there, x86 everywhere, all from the same sanctified make incantation.

  4. Think: Vagrant's disciplined cousin who ACTUALLY GRADUATED from build school and now runs a tight ship with Alpine precision.

Someone has to keep the runtime honest...

Prerequisite: a working installation of Docker Instalation (any recent 24-plus release on macOS, Windows, or modern Linux). That’s it!!! — Now go forth and make without fear — your local machine remains pristine.

To install you simply run:

Unix/Linux/macOS:

curl -L https://github.com/frinknet/metabuild/raw/main/install.sh | sh

Windows:

iex (iwr https://github.com/frinknet/metabuild/raw/main/install.bat).Content

Docker (for the curious):

docker pull ghcr.io/frinknet/metabuild:latest
docker tag ghcr.io/frinknet/metabuild:latest metabuild
echo -e '#/bin/sh\ndocker run --rm -it -u $(id -u):$(id -g) -v "$(pwd):/build" metabuild "$@"' > metabuild.sh
chmod +x metabuild.sh

Or for the lite version:

curl -L https://github.com/frinknet/metabuild/raw/main/install.sh | sh -s -- lite
iex ((iwr 'https://github.com/frinknet/metabuild/raw/main/install.bat').Content + ' lite')
docker pull ghcr.io/frinknet/metabuild:lite
docker tag ghcr.io/frinknet/metabuild:lite metabuild
echo -e '#/bin/sh\ndocker run --rm -it -u $(id -u):$(id -g) -v "$(pwd):/build" metabuild "$@"' > metabuild.sh
chmod +x metabuild.sh

Zero Config Needed

Makefiles suck when you have to hand write them by hand. But CMake, Ninja, waf, and their kin suck more. We give you a premium Makefile to start with with testing and multi-arch builds. To use the builtin Makefile just make sure your files structure follows our exact directory pattern. Right now this only works for C and C++. However, We are planning to expand this to Go and Rust soon.

Path What lives here Why it matters
lib/ Git submodules only External code; pulled shallow for speed.
syslib/ System headers Pretend-system roots for exotic targets.
include/ Project headers Stable API surface.
src/<app>/ Source trees Each sub-dir becomes its own executable in out/<target>/bin/.
src/templates/<template>/ Scaffolding Templates metabuild new [template] [name] clones a template straight into src/.
test/unit/ Unit Tests Run with pattern targets like unit-test-name.
test/case/ Case Tests Run with pattern targets like case-test-name.
test/load/ Load Tests$ Run with pattern targets like load-test-name.
out/<target>/ Build artefacts Autogenerated; ignored by Git.
docs/ Documentation Any docs needed to run stuff.
web/ Web subsystems Should use a separate container.

Hacking the System

You can change the internal Makefiles to your liking using our metabuild extend. This Installs the Makefile locally so you can hack it up however you need. We prefer your makefile over ours so you can do as you need.

Additionally, you can install just the build scripts with metabuild init although our system will work fine without it. But that way youcan ship your project with a buildscript that just works. This is the recomended use case for professional projects.

You can also fork this repo and hack the entire system. All of the github actions are generic so your for will build its own container automatically. However, you may need to go into Github and make your package container public after the first build.

About

Metabuild - ZeroConf Build System for cross compilation with 6 compilers and testing built-in as long as you layout your project correctly.

Topics

Resources

License

Stars

Watchers

Forks

Packages