KernelEngine is a microkernel game engine: ABI-stable C contracts, Zig plugins behind them, and a managed C# layer for game code. Every capability is a plugin behind a vtable contract, and a plugin exports one factory per header. Because the contracts are plain C, any language that can call C can reach the ECS, the renderer or the framework the same way.
| layer | where | holds |
|---|---|---|
| 1, C contracts | src/c/<domain>/kernel_engine/<domain>/ |
vtable shapes, parameter structs, enums; headers only |
| 2, plugins | src/zig/<domain>/<plugin>/ |
every implementation, one shared library each |
| 3, C# bindings | src/csharp/<domain>/*/Native/Generated/ |
P/Invoke surface generated from the headers |
| 4, C# managed | src/csharp/<domain>/KernelEngine.*/ |
wrappers, framework, game code |
- Zig 0.16.
- .NET 10.
Native (Zig and vcpkg):
zig build --prefix build/native --global-cache-dir build/zig-global
zig build test --prefix build/native --global-cache-dir build/zig-globalManaged (.NET):
dotnet build
dotnet test KernelEngine.slnxA C example is built with the native tree:
build/native/bin/c_demo_01The smallest C# host is 00_runtime_minimal. It registers the ECS, the task pool, the runtime and a window module, loads the modules and ticks the loop.
dotnet run --project examples/csharp/00_runtime_minimalMore examples are under examples/c and examples/csharp.
- Read CLAUDE.md for the build, the layer rules and the coding conventions.
- Work reaches
mainas described in Git. - Commits follow Conventional Commits, one per logical task.
- Documents are written to Documentation.
scripts/verify.csruns the gates that check the rules a machine can check.