A lean, extensible 2D game framework for .NET.
kajarlabs.Framework is built around predictable low-allocation performance, first-class NativeAOT compatibility, and clean cross-platform abstractions on top of .NET and SDL3.
- NativeAOT & trimming first — libraries are
IsAotCompatiblewith compile-time source generation ([Cached]/[Resolved]DI,[LoggerMessage]) instead of runtime reflection. - Cross-platform SDL3 & GPU rendering — windowing and hardware-accelerated rendering across Vulkan, Direct3D 12, and Metal behind a managed .NET API.
- Composable scene & testing — hierarchical 2D scene graph (
Drawable,Container,Box,Sprite), reactive bindables, unified input/key bindings, and deterministic headless testing viaHeadlessGameHost.
- A desktop platform (Windows, Linux, or macOS) with the .NET 11 SDK (see
global.json). - NativeAOT build prerequisites for your platform when publishing
samples/aot-smoke. - An IDE with C# and EditorConfig support, such as JetBrains Rider, Visual Studio, or Visual Studio Code.
Open kajar-framework.slnx in your IDE or build from the command line:
dotnet build
dotnet testYou can also run any sample directly from samples/, for example:
dotnet run --project samples/interactive-inputThe full verification suite (formatting, Release build, xUnit v3 tests, NativeAOT smoke publish/run, and NuGet packing) can be run with ./scripts/check.ps1 or ./scripts/check.sh.
Contributions can be made via pull requests targeting develop.
If you're unsure of what you can help with, check out the list of open issues. Please open an issue before starting work on new features or architectural changes, and make sure ./scripts/check.ps1 (or ./scripts/check.sh) passes before submitting.
This framework is licensed under the MIT license. Please see the license file for more information.