How it all fits
Architecture is the game's side: the layers a frame goes through. This page is the maintainer's side: the repositories, the programs that turn a checkout into a binary for each target, and the places where one part reads a version or a file from another. When something breaks after years of nobody touching it, the break is at one of these joints.
The repositories#
- raylib_multiplatform
- The framework: the library, the vendored libraries under
thirdparty/, the tools, the tests, the examples, the workflows. A game is not a fork of it but a copy of the filesINCLUDEintools/rmp.pylists, made byrmp new; from then on the game keeps the framework it was made with, and onlyrmp update, run on purpose, moves it. - raylib-build-image
- Two images:
ghcr.io/omardev29/raylib-build, the toolchain of every Linux, web and Android job, andghcr.io/omardev29/raylib-run-alpine, the Alpine the musl build is started on. The framework pins both by digest. The build image's Gradle home is warmed by building the framework's Android project at a commit the image names, so the two repositories point at each other: an Android bump moves them in a set order. - raylib-iOS
- raylib has no iOS backend of its own. The framework's comes from a fork of a third party's port,
kept under the same account so that the commit it pins cannot vanish with somebody else's
repository;
thirdparty/raylib-iosis the submodule, used by the iOS target only. - rmp-docs
- This site, made of HTML fragments and of the framework's headers by one Python script, and
checked against the framework at the commit in its
FRAMEWORK_REFfile. Its CI runs in the build image the framework pins at that commit, read from the framework'sci.yml, so the site never keeps a digest of its own. A daily workflow checks the site against the framework's newest commit and keeps one issue open while they disagree.
Plans and the record of what was decided live in a fourth repository of documents, checked out
around the framework on Omar's machine and beside it in the cloud; the framework's
CLAUDE.md says where. Nothing builds from it.
From a checkout to a binary#
- The launcher.
rmp(POSIX sh),rmp.ps1andrmp.cmddo one thing: find a Python that is 3.11 or newer and hand ittools/rmp.pyand every argument. Everythingrmpdoes is in that one file. - The
generator.
tools/configure.pyreadsraylib_multiplatform.toml, refuses anything wrong with the line it is on, and writes what every build system reads. CMake runs it on every configure, beforeproject(), because the project's own name comes out of it; Gradle and XcodeGen never run CMake, so their jobs run it first. The config pipeline has every file it writes. - CMake.
CMakePresets.jsonholds the presets a build is named by — debug and release, their DRM twins, web, the headless memory build and the lint build.CMakeLists.txtadds raylib fromthirdparty/raylib, compiles the framework once into the staticrmplibrary, and links the game and every example against it. The files undercmake/are what it includes: the hook that runs the generator, the Python it looks for, the sanitizers' probe, the riscv64 toolchain, the game's resources and tests. - Gradle and Xcode. Android builds through
raymob/, whoseraymob/app/src/main/cpp/CMakeLists.txtcompiles the same sources with the NDK; iOS through an Xcode project XcodeGen makes from what the generator writes. Neither reads the top-levelCMakeLists.txt, which is why a header path goes on four lists, not one (CLAUDE.md, "A vendored header goes on FOUR include lists"). - Packaging. A release is packed by the release job of each family: UPX on the
Linux targets whose packed binary CI starts, the resources bundled into one
resources.rres,LICENSES.txtgenerated fromTHIRD_PARTY_LICENSES.md, andtools/size_check.pyholding every binary to its line intools/size_budget.txt.
Nothing in that path
downloads anything: there is no FetchContent, no package manager and no submodule
but iOS's. A clone, a Python of 3.11 or newer, CMake, Ninja and a compiler build the desktop game.
The generator uses Python's standard library only; Pillow, when it is there, makes the icons.
Who builds each family#
| Family | Compiler | Where CI builds it | Pinned by |
|---|---|---|---|
| Linux, glibc | zig's clang, aiming at the glibc floor of [linux] glibc, through tools/linux_build.sh | inside the build image, x64 on ubuntu-24.04, arm64 on ubuntu-24.04-arm | the image digest; zig |
| Linux, musl | zig, for musl | inside the build image; started on the Alpine run image | both digests |
| Linux, riscv64 | the image's riscv64-linux-gnu GCC, cmake/toolchain-riscv64-linux.cmake | inside the build image, started under QEMU there | the image digest |
| Linux, DRM | the image's own compiler: zig cannot link libdrm, gbm and EGL | inside the build image; started on vkms on a bare runner | the image digest |
| Web | Emscripten | inside the build image | emscripten, and the image's emsdk commit |
| Android | the NDK's clang, through Gradle | inside the build image, amd64, offline | the image digest, the Android set |
| Windows | the compiler CMake finds first on the runner | on the windows_runner runner image | the runner label only: see below |
| macOS and iOS | Apple's clang from the pinned Xcode | on the macos_runner runner image | xcode, xcodegen, ninja_mac |
| The BSDs | each system's own compiler | in a virtual machine started by cross-platform-actions | freebsd, openbsd, netbsd; their package mirrors are rolling |
The workflows#
ci.yml is the entry point. Its config job runs the generator and turns
the enabled targets into a matrix per family, then calls one reusable workflow per family —
_linux.yml, _web.yml, _windows.yml, _android.yml,
_apple.yml, _bsd.yml — beside the framework's own jobs: lint, tidy, the
examples, the e2e scripts, the new game, coverage, the deterministic deep tests, the docs and the
API gate. A tag adds the release, which gathers what every family packed, and the itch.io job
after it; a full run with Android enabled adds Firebase Test Lab.
CI says what each push runs.
Three more run on their own, on the framework's repository only:
-
deep.yml, every night (fuzzing, random seeds) and every Sunday (mutation), opening an issue labellednightly-findingper new failure; canary.yml, every Monday: the same reusable workflows against the floating versions — the image's:latest, the newest runners, Xcode and Mesa — and a report of what is newer than every pin;autofix.yml, after a red canary: an agent on the broken family's own runner that proposes a fix as a draft pull request.
web-backends.yml builds the web game once per [web] backend and checks
each build is the backend it asked for; it runs by hand and on a push that changes the files that
choose the backend.
The image, in the middle#
The
build image is the joint most things go through. Every Linux, web and Android job, the lint and
tidy jobs, the examples and their scripts, coverage, the deep tests, the new game and this site's
own CI run inside it, at the one digest the framework names in ci.yml, in
web-backends.yml, three times in deep.yml and in
thirdparty/FROZEN_VERSIONS.md. Exactness lives there too: the e2e shots are compared
pixel for pixel, and the coverage floors and header costs are held, only inside it, because they
were measured there. The build image says
what is in it and how to make a new one.
The gates around it#
Around the code sits a set of checks about as large as the code: tools/ holds a
gate per rule (naming, style, ownership, pointers, headers, licences, versions, workflows,
portability, shell patterns, seams, sizes), and tests/ holds tests of the tests — each
gate seen red on a planted mistake, the campaign's own rules, the workflows read as text. They are
what lets an agent or a person change one file without reading every other one. They are also
code to maintain: a renamed step in a workflow, a new compiler warning, a moved line in a vendored
file can turn one red with nothing wrong in the game. Upgrading
a dependency lists, for each bump, which of them to expect.