Working on Gargantuan
Are you interested in working on Gargantuan? This guide walks through how to compile and work on your own homegrown Gargantuans.
Prerequisites
Section titled “Prerequisites”You should be able to compile Gargantuan successfully on the following platforms (older and newer versions might work):
- Windows 10
- MacOS 26 + XCode 26
- Linux
Gargantuan provides a Justfile which is used with Just to simplify the build process. It is strongly recommend you install Just before proceeding.
You can get a summary of all recipes with:
just -lAlternatively, you can manually run the commands inside the Justfile and replace any variables as you see fit. This is most important when working on Windows, where commands default to PowerShell (Bash installation process is awful on Windows)
Source Code
Section titled “Source Code”Clone the repository and all its submodules using the following command:
git clone --recursive https://github.com/teamfireworks/gargantuan.gitTo update an existing clone, run the submodules Justfile recipe.
Dependencies
Section titled “Dependencies”To build Gargantuan, you need:
- CMake >=3.25
- Ninja ~1.13
- CCache ~4.13
- glslc ~v2026.2
- Rokit
-
It is preferred to install Lest (the test runner) using Rokit, as Gargantuan’s test suite makes use of the unreleased
gargantuanbackend.You can wipe Rokit’s Lest via:
Terminal window rm ~/.rokit/bin/lest
-
If you have Vulkan SDK, glslc comes included.
Windows
Section titled “Windows”- Windows 10 and/or 11
- Vulkan SDK
DirectX 12 will eventually be supported.
- MacOS 26 and XCode 26
- Vulkan SDK IF you want to test Vulkan via MoltenVK
- Vulkan SDK comes included with glslc
Homebrew can be used to trivially install CMake, Ninja, and CCache:
brew install cmake ninja ccacheSeveral people have successfully run and developed Gargantuan in Linux. Unfortunately, they are vagueposters.
Automated Building
Section titled “Automated Building”Automated, versioned and packaged builds of Gargantuan will be provided once Gargantuan Studio is established.
Manual Building
Section titled “Manual Building”-
Get Gargantuan source code, then create a
builddirectory inside to leave all the files that are result of the compilation process (.exe,.lib,.obj,.a,.o, etc):Terminal window cd ~/Code/teamfireworks/gargantuanmkdir build -
Run the
buildJustfile recipe to instantiate CMake.Terminal window just configure -
After you have configured cmake, you have to compile the engine:
Terminal window just build -
When ninja finishes the compilation, you can find the executable inside
./build/gargantuan.
Codebase
Section titled “Codebase”Gargantuan comprises of multiple components:
classesandservices, which implement instance classes with theInstancebase classdatatypeswhich implement the runtime types including theInstancescripting, which provides the runtime alongsideUserdataand the global libraries in Luaureflection, which provides registries for instance classes and enumsrender, which implements theRendererand related classes- Other components are self-explanatory
Implementing New Data Types
Section titled “Implementing New Data Types”- Add a header file and implement a class using the
G_USERDATA_DECLmacros - Add a source file and define the userdata with the
G_USERDATA_IMPLmacro - Implement your data type
- Open
ScriptEngine’s header file to add a matchingOpenLibstatic function - Implement a
Liband the matchingOpenLibfunction for your data type - Write unit tests & polish!
Implementing New Instances
Section titled “Implementing New Instances”- Add a header file and implement a class that extends the
Instanceclass, includeG_INSTANCE_DECLin the instance’s body - Add a source file and define the instance with the
G_INSTANCE_IMPLmacro - Implement your instance with whatever modules you need
- Write unit tests & polish!
Profiling
Section titled “Profiling”Gargantuan is instrumented for Tracy. The client is disabled by default and collects nothing until Tracy’s profiler connects.
Build the tools once. They are separate programs, so they disabled by default:
cmake -B build -DGARGANTUAN_TRACY_TOOLS=ONcmake --build build --target tracy-profiler tracy-capture tracy-csvexportAfter running the engine, connect to Tracy:
just run ..../build/bin/tracy-profilertracy-capture -o run.tracy -s 10 records without a window open, and
tracy-csvexport run.tracy prints per-zone totals, which is how two runs get
compared.
-DGARGANTUAN_TRACY=OFF or just build --tracy=OFF completely disables
profiling.
Code style
Section titled “Code style”- Follow conventional commits.
- Don’t write comments. Code should be self-documenting, and Gargantuan already has API documentation.
- Proofread surrounding code before submitting.
- camelCase for local variables and parameters. LOUD_SNAKE_CASE for constants. PascalCase for everything else.
Hat Tricks
Section titled “Hat Tricks”Gargantuan has additional Justfile recipes to help simplify working on the engine.
Run the binary with the gargantuan recipe:
just gargantuan --helpRun an assets/example script, the assets/testbed project, or the
studio project:
just run_example cube.luaujust run_testbedjust run_studioWhen you make changes in Gargantuan, you can easily rebuild the engine and run
the binary with the fresh recipes:
just fresh_example cube.luaujust fresh_testbedjust fresh_studioTests are written using the Lest framework. To run the test suite:
just test