Architecture of itsnotrexed/leonida
itsnotrexed/leonida is 389 source files holding 7,772 symbols across 7 modules, written mainly in Python, C++, C#. The largest module is tests, with 162 files, and 2 files are entry points into the dependency graph.
How leonida fits together
make_game.py is the build driver. It runs the stages check, shaders, assets, runtime and pipelines in order, and its version check compares each package file's name, size and SHA-256 with the supported versions. The shader pipeline starts in tools/shader_carve.py, which carves DXBC containers out of shaders.rpf, and fssm_unpack.py then unpacks the native RDNA2 program. shader_disasm.py disassembles that program with LLVM for gfx1013, and rdna2spirv.py translates it to SPIR-V. Asset export runs through tools/rpf9dump, which finds resources inside RPF9 archives and the loose .ttpf texture pools. The runtime in runtime/ maps the PE image and resolves its imports to shims for GDK, XMem and d3d12_xs, with runtime/src/main.cpp as its entry point. The finished build is written to Documents\Leonida by default.
Largest modules
- tests: 162 files and 37,806 lines of code
- tools: 75 files and 29,513 lines of code
- runtime: 69 files and 20,961 lines of code
- third_party: 20 files and 4,837 lines of code
- scripts: 3 files and 1,075 lines of code
- root: 1 file and 613 lines of code
- viewer: 1 file and 108 lines of code
Languages
By file count: Python 240 files, C++ 86 files, C# 4 files, JavaScript 1 file.
Documentation
Repowise documents leonida in 275 pages generated from the source, 15 of them written explanations of the repository and its modules. Module guides include:
- scripts: Audit, Benchmark, and GPU Test Scripts
- root: Game Assembly Entry Point
More on leonida: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos