# yusufgundar/kernelnucleust architecture

> Architecture diagram of the GitHub repository yusufgundar/kernelnucleust, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yusufgundar/kernelnucleust
- Repository: https://github.com/yusufgundar/kernelnucleust

## Overview

KernelNucleusT is a header-only C++20 library whose broad runtime surface includes reusable utility structures and a cross-platform window/event system. The principal window workflow is application use of the window API, platform-specific window creation and event handling, then event dispatch to the application. The README documents optional OpenGL/Vulkan rendering and major platform capabilities; source excerpts establish the core’s backend references and several dispatch paths. Utility-to-utility dependencies and unsampled backend wiring are not inferred.

Main entry points: [`include/platform/knst_window/knst_window_core.hpp`](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_core.hpp) (Window Core), [`include/platform/knst_window/knst_window_event_system.hpp`](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_event_system.hpp) (Event System), [`include/platform/android/knst_window_android_event_manager.hpp`](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_event_manager.hpp) (Android Events), [`include/platform/android/knst_window_android_manager.hpp`](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_manager.hpp) (Android Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_window["Window Core"]
  node_window_api["Window API<br/>[knst_window.hpp]"]
  node_window_core["Window Core"]
  node_event_system["Event System"]
  node_display_api["Display API<br/>[knst_display.hpp]"]
end

subgraph group_platforms["Platform Backends"]
  node_win32_window["Win32 Window"]
  node_win32_events["Win32 Events"]
  node_x11_window["X11 Window"]
  node_x11_events["X11 Events"]
  node_wayland_window["Wayland Window"]
  node_wayland_events["Wayland Events"]
  node_wayland_protocols["Wayland Protocols"]
  node_android_window["Android Window"]
  node_android_events["Android Events"]
end

subgraph group_rendering["Rendering Backends"]
  node_opengl["OpenGL Backend"]
  node_vulkan["Vulkan Backend"]
end

subgraph group_utilities["Utility Structures"]
  node_byte_string["Byte String"]
  node_c16string["UTF-16 String<br/>[knst_c16string.hpp]"]
  node_devices["Devices<br/>[knst_devices.hpp]"]
  node_file["File I/O<br/>[knst_file.hpp]"]
  node_image_loader["Image Loader"]
  node_process["Process<br/>[knst_process.hpp]"]
  node_thread["Thread<br/>[knst_thread.hpp]"]
  node_thread_pool["Thread Pool"]
  node_vector["Vector<br/>[knst_vector.hpp]"]
end

node_application(("Application"))

node_application -->|"uses"| node_window_api
node_window_api -.->|"provides"| node_window_core
node_window_core -->|"dispatches"| node_event_system
node_window_core -->|"uses"| node_display_api
node_window_core -->|"selects backend"| node_win32_window
node_window_core -->|"selects backend"| node_x11_window
node_window_core -->|"selects backend"| node_wayland_window
node_window_core -->|"selects backend"| node_android_window
node_win32_events -->|"dispatches events"| node_event_system
node_x11_events -->|"dispatches events"| node_event_system
node_wayland_events -->|"dispatches events"| node_event_system
node_android_events -->|"dispatches events"| node_event_system
node_android_events -->|"uses JNI bridge"| node_android_window
node_android_window -->|"includes event handling"| node_android_events
node_window_core -.->|"supports optional"| node_opengl
node_window_core -.->|"supports optional"| node_vulkan
node_wayland_window -.->|"uses extensions"| node_wayland_protocols

click node_window_api "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_window.hpp"
click node_window_core "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_core.hpp"
click node_event_system "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_event_system.hpp"
click node_display_api "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_display.hpp"
click node_win32_window "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/windows/knst_window_win32_manager.hpp"
click node_win32_events "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/windows/knst_window_win32_event_manager.hpp"
click node_x11_window "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/x11/knst_window_x11_manager.hpp"
click node_x11_events "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/x11/knst_window_x11_event_manager.hpp"
click node_wayland_window "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/wayland/knst_window_wayland_manager.hpp"
click node_wayland_events "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/wayland/knst_window_wayland_event_manager.hpp"
click node_wayland_protocols "https://github.com/yusufgundar/kernelnucleust/tree/main/include/platform/linux/wayland/protocol_files"
click node_android_window "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_manager.hpp"
click node_android_events "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_event_manager.hpp"
click node_opengl "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/opengl_content/knst_window_opengl_content.hpp"
click node_vulkan "https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/vulkan_content/knst_window_vulkan_content.hpp"
click node_byte_string "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_byte_string.hpp"
click node_c16string "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_c16string.hpp"
click node_devices "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_devices.hpp"
click node_file "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_file.hpp"
click node_image_loader "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_image_loader.hpp"
click node_process "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_process.hpp"
click node_thread "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_thread.hpp"
click node_thread_pool "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_thread_pool.hpp"
click node_vector "https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_vector.hpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_window_api,node_window_core,node_event_system,node_display_api toneBlue
class node_win32_window,node_win32_events,node_x11_window,node_x11_events,node_wayland_window,node_wayland_events,node_wayland_protocols,node_android_window,node_android_events toneAmber
class node_opengl,node_vulkan toneMint
class node_byte_string,node_c16string,node_devices,node_file,node_image_loader,node_process,node_thread,node_thread_pool,node_vector toneRose
class node_application toneIndigo
```

## Components

### Window Core

- [Window API](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_window.hpp): `include/knst_window.hpp`
- [Window Core](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_core.hpp): `include/platform/knst_window/knst_window_core.hpp`
- [Event System](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_window_event_system.hpp): `include/platform/knst_window/knst_window_event_system.hpp`
- [Display API](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/knst_display.hpp): `include/platform/knst_window/knst_display.hpp`

### Platform Backends

- [Win32 Window](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/windows/knst_window_win32_manager.hpp): `include/platform/windows/knst_window_win32_manager.hpp`
- [Win32 Events](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/windows/knst_window_win32_event_manager.hpp): `include/platform/windows/knst_window_win32_event_manager.hpp`
- [X11 Window](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/x11/knst_window_x11_manager.hpp): `include/platform/linux/x11/knst_window_x11_manager.hpp`
- [X11 Events](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/x11/knst_window_x11_event_manager.hpp): `include/platform/linux/x11/knst_window_x11_event_manager.hpp`
- [Wayland Window](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/wayland/knst_window_wayland_manager.hpp): `include/platform/linux/wayland/knst_window_wayland_manager.hpp`
- [Wayland Events](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/linux/wayland/knst_window_wayland_event_manager.hpp): `include/platform/linux/wayland/knst_window_wayland_event_manager.hpp`
- [Wayland Protocols](https://github.com/yusufgundar/kernelnucleust/tree/main/include/platform/linux/wayland/protocol_files): `include/platform/linux/wayland/protocol_files`
- [Android Window](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_manager.hpp): `include/platform/android/knst_window_android_manager.hpp`
- [Android Events](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/android/knst_window_android_event_manager.hpp): `include/platform/android/knst_window_android_event_manager.hpp`

### Rendering Backends

- [OpenGL Backend](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/opengl_content/knst_window_opengl_content.hpp): `include/platform/knst_window/opengl_content/knst_window_opengl_content.hpp`
- [Vulkan Backend](https://github.com/yusufgundar/kernelnucleust/blob/main/include/platform/knst_window/vulkan_content/knst_window_vulkan_content.hpp): `include/platform/knst_window/vulkan_content/knst_window_vulkan_content.hpp`

### Utility Structures

- [Byte String](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_byte_string.hpp): `include/knst_byte_string.hpp`
- [UTF-16 String](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_c16string.hpp): `include/knst_c16string.hpp`
- [Devices](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_devices.hpp): `include/knst_devices.hpp`
- [File I/O](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_file.hpp): `include/knst_file.hpp`
- [Image Loader](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_image_loader.hpp): `include/knst_image_loader.hpp`
- [Process](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_process.hpp): `include/knst_process.hpp`
- [Thread](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_thread.hpp): `include/knst_thread.hpp`
- [Thread Pool](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_thread_pool.hpp): `include/knst_thread_pool.hpp`
- [Vector](https://github.com/yusufgundar/kernelnucleust/blob/main/include/knst_vector.hpp): `include/knst_vector.hpp`

### Other components

- **Application**

## Connections

- Application → Window API: uses
- Window API → Window Core: provides
- Window Core → Event System: dispatches (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Window Core → Display API: uses (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Window Core → Win32 Window: selects backend (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Window Core → X11 Window: selects backend (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Window Core → Wayland Window: selects backend (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Window Core → Android Window: selects backend (evidence: `include/platform/knst_window/knst_window_core.hpp`)
- Win32 Events → Event System: dispatches events (evidence: `include/platform/knst_window/knst_window_event_system.hpp`)
- X11 Events → Event System: dispatches events (evidence: `include/platform/knst_window/knst_window_event_system.hpp`)
- Wayland Events → Event System: dispatches events (evidence: `include/platform/knst_window/knst_window_event_system.hpp`)
- Android Events → Event System: dispatches events (evidence: `include/platform/knst_window/knst_window_event_system.hpp`)
- Android Events → Android Window: uses JNI bridge (evidence: `include/platform/android/knst_window_android_event_manager.hpp`)
- Android Window → Android Events: includes event handling
- Window Core → OpenGL Backend: supports optional
- Window Core → Vulkan Backend: supports optional
- Wayland Window → Wayland Protocols: uses extensions
