Build & Run
Quick Build
This compiles shaders, builds the C++ shared library, builds the physics library, compiles all C# files, and launches the viewer.
Build Targets
make run
The primary development command. Builds all four stages (shaders, C++ renderer, physics library, C# executable) then launches:
DYLD_LIBRARY_PATH— locateslibrenderer.dylibandlibjoltc.dylibinbuild/, plus MoltenVK/GLFW in/opt/homebrew/libVK_ICD_FILENAMES— tells the Vulkan loader where to find the MoltenVK ICD (note:/etc/not/share/on Homebrew)
make dev
Splits C# into three assemblies for live code reloading:
Save any file in game_logic/ and the engine auto-recompiles and reloads your game code without restarting. See Hot Reload for details.
make viewer
Builds everything without running. Useful for checking compilation without launching the window:
make app
Creates a self-contained macOS .app bundle with all dylibs and the Mono runtime embedded:
make shaders
Compiles only GLSL shaders to SPIR-V. Useful during shader development:
Compiles these shaders:
make clean
Removes all build artifacts:
Build Pipeline
The build has four stages that run in dependency order:
Stage 3 only runs on first build or after make clean. Subsequent builds skip it if the physics library already exists.
What the Build Does
- Compiles shaders —
glslccompiles 7 GLSL files (scene, UI, shadow) to SPIR-V - Builds C++ renderer — CMake compiles renderer code into
build/librenderer.dylib - Builds physics — CMake compiles joltc into
build/libjoltc.dylib - Compiles C# —
mcscompiles all.csfiles intobuild/Viewer.exe - Links at runtime —
mono Viewer.exeloads both.dylibfiles via P/Invoke