To avoid reinventing the wheel while keeping your custom engine lightweight, the zig gamedev ecosystem is the gold standard middleware stack for Zig because it packages battle tested C/C++ industry libraries with clean, zero overhead Zig bindings and build.zig integration. [1] (https://github.com/zig gamedev)
If I were building out the core subsystems of a custom 3D engine in Zig right now, I would assemble a modular stack from zig gamedev paired with a dedicated profiler rather than writing physics, audio, or asset loaders from scratch.
Core Middleware Stack by Subsystem
Engine Subsystem Recommended Library Underlying Tech / Why It Works
3D Physics zphysics (or zbullet) Wraps Jolt Physics (used in Horizon Forbidden West), giving you multi threaded, deterministic rigid body and character physics.
Graphics & Shaders zgpu + zslang zgpu wraps WebGPU (Dawn) for cross platform Vulkan/D3D12/Metal; zslang compiles modern Slang shaders directly in your build pipeline.
Windowing & Input zsdl (SDL3) or zglfw zsdl gives you SDL3's robust controller mapping and windowing, ideal for local multiplayer; zglfw is lighter if you only need basic desktop windows.
Audio Engine zaudio Wraps miniaudio, handling cross platform device backends, 3D spatialization, mixing, and decoding in a tiny footprint.