# eglantine-community/eglantine architecture

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

- Interactive diagram: https://gitdiagram.com/eglantine-community/eglantine
- Repository: https://github.com/eglantine-community/eglantine

## Overview

Eglantine is a cross-platform Switch 2 emulator. Its user-facing goal is to select game content, launch it, emulate the console, and present rendered output with audio and input. The tree also shows content/firmware management, controller support, system-service emulation, graphics backends, and Android and Qt frontends. The excerpts expose only a few concrete connections, so the graph leaves most subsystem relationships unconnected rather than assuming a call chain; several capabilities are represented by their source files without inferred wiring.

Main entry points: [`src/yuzu/bootmanager.cpp`](https://github.com/eglantine-community/eglantine/blob/nx2/src/yuzu/bootmanager.cpp) (Qt frontend), [`src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt`](https://github.com/eglantine-community/eglantine/blob/nx2/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt) (Android frontend), [`src/core/core.h`](https://github.com/eglantine-community/eglantine/blob/nx2/src/core/core.h) (Emulation core), [`src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp`](https://github.com/eglantine-community/eglantine/blob/nx2/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp) (Shader optimization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User frontends"]
  node_qt["Qt frontend<br/>[bootmanager.cpp]"]
  node_android["Android frontend<br/>[NativeLibrary.kt]"]
  node_qt_controller["Qt controller UI<br/>[qt_controller.cpp]"]
  node_driver_manager["GPU driver management"]
end

subgraph group_content["Content management"]
  node_content_mgr["Content manager<br/>[content_manager.h]"]
  node_firmware["Firmware manager"]
  node_compressed_storage["Compressed storage"]
end

subgraph group_emulation["Console emulation"]
  node_core["Emulation core<br/>[core.h]"]
  node_ns_query["Play statistics service<br/>[query_service.cpp]"]
  node_remote_storage["Remote storage service"]
  node_play_time["Play-time tracking"]
end

subgraph group_graphics["Graphics"]
  node_opengl["OpenGL pipelines"]
  node_vulkan_cache[("Vulkan pipeline cache")]
  node_shader_opt["Shader optimization"]
  node_upload["GPU uploads<br/>[engine_upload.cpp]"]
end

subgraph group_io["Input and audio"]
  node_hid["Emulated controllers"]
  node_input_engine["Input engine<br/>[input_engine.cpp]"]
  node_audio["Audio renderer<br/>[system_manager.cpp]"]
end

node_user(("Player"))

node_user -.->|"uses"| node_qt
node_user -.->|"uses"| node_android
node_qt -.->|"starts emulation"| node_core
node_android -.->|"starts emulation"| node_core
node_content_mgr -->|"references core"| node_core
node_ns_query -->|"queries statistics"| node_play_time
node_qt -->|"signals lifecycle"| node_user
node_qt_controller -->|"uses controller API"| node_hid
node_opengl -.->|"uses shader IR"| node_shader_opt
node_vulkan_cache -->|"uses shader IR"| node_shader_opt
node_driver_manager -->|"manages drivers"| node_android

click node_qt "https://github.com/eglantine-community/eglantine/blob/nx2/src/yuzu/bootmanager.cpp"
click node_android "https://github.com/eglantine-community/eglantine/blob/nx2/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt"
click node_content_mgr "https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/content_manager.h"
click node_firmware "https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/firmware_manager.cpp"
click node_core "https://github.com/eglantine-community/eglantine/blob/nx2/src/core/core.h"
click node_ns_query "https://github.com/eglantine-community/eglantine/blob/nx2/src/core/hle/service/ns/query_service.cpp"
click node_remote_storage "https://github.com/eglantine-community/eglantine/blob/nx2/src/core/hle/service/olsc/remote_storage_controller.cpp"
click node_compressed_storage "https://github.com/eglantine-community/eglantine/blob/nx2/src/core/file_sys/fssystem/fssystem_compressed_storage.h"
click node_hid "https://github.com/eglantine-community/eglantine/blob/nx2/src/hid_core/frontend/emulated_controller.cpp"
click node_input_engine "https://github.com/eglantine-community/eglantine/blob/nx2/src/input_common/input_engine.cpp"
click node_qt_controller "https://github.com/eglantine-community/eglantine/blob/nx2/src/yuzu/applets/qt_controller.cpp"
click node_audio "https://github.com/eglantine-community/eglantine/blob/nx2/src/audio_core/renderer/system_manager.cpp"
click node_opengl "https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp"
click node_vulkan_cache "https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp"
click node_shader_opt "https://github.com/eglantine-community/eglantine/blob/nx2/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp"
click node_upload "https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/engines/engine_upload.cpp"
click node_driver_manager "https://github.com/eglantine-community/eglantine/blob/nx2/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt"
click node_play_time "https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/play_time_manager.cpp"

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_qt,node_android,node_qt_controller,node_driver_manager toneBlue
class node_content_mgr,node_firmware,node_compressed_storage toneAmber
class node_core,node_ns_query,node_remote_storage,node_play_time toneMint
class node_opengl,node_vulkan_cache,node_shader_opt,node_upload toneRose
class node_hid,node_input_engine,node_audio,node_user toneIndigo
```

## Components

### User frontends

- [Qt frontend](https://github.com/eglantine-community/eglantine/blob/nx2/src/yuzu/bootmanager.cpp): `src/yuzu/bootmanager.cpp`
- [Android frontend](https://github.com/eglantine-community/eglantine/blob/nx2/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt): `src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt`
- [Qt controller UI](https://github.com/eglantine-community/eglantine/blob/nx2/src/yuzu/applets/qt_controller.cpp): `src/yuzu/applets/qt_controller.cpp`
- [GPU driver management](https://github.com/eglantine-community/eglantine/blob/nx2/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt): `src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt`

### Content management

- [Content manager](https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/content_manager.h): `src/frontend_common/content_manager.h`
- [Firmware manager](https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/firmware_manager.cpp): `src/frontend_common/firmware_manager.cpp`
- [Compressed storage](https://github.com/eglantine-community/eglantine/blob/nx2/src/core/file_sys/fssystem/fssystem_compressed_storage.h): `src/core/file_sys/fssystem/fssystem_compressed_storage.h`

### Console emulation

- [Emulation core](https://github.com/eglantine-community/eglantine/blob/nx2/src/core/core.h): `src/core/core.h`
- [Play statistics service](https://github.com/eglantine-community/eglantine/blob/nx2/src/core/hle/service/ns/query_service.cpp): `src/core/hle/service/ns/query_service.cpp`
- [Remote storage service](https://github.com/eglantine-community/eglantine/blob/nx2/src/core/hle/service/olsc/remote_storage_controller.cpp): `src/core/hle/service/olsc/remote_storage_controller.cpp`
- [Play-time tracking](https://github.com/eglantine-community/eglantine/blob/nx2/src/frontend_common/play_time_manager.cpp): `src/frontend_common/play_time_manager.cpp`

### Graphics

- [OpenGL pipelines](https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp): `src/video_core/renderer_opengl/gl_graphics_pipeline.cpp`
- [Vulkan pipeline cache](https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp): `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp`
- [Shader optimization](https://github.com/eglantine-community/eglantine/blob/nx2/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp): `src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp`
- [GPU uploads](https://github.com/eglantine-community/eglantine/blob/nx2/src/video_core/engines/engine_upload.cpp): `src/video_core/engines/engine_upload.cpp`

### Input and audio

- [Emulated controllers](https://github.com/eglantine-community/eglantine/blob/nx2/src/hid_core/frontend/emulated_controller.cpp): `src/hid_core/frontend/emulated_controller.cpp`
- [Input engine](https://github.com/eglantine-community/eglantine/blob/nx2/src/input_common/input_engine.cpp): `src/input_common/input_engine.cpp`
- [Audio renderer](https://github.com/eglantine-community/eglantine/blob/nx2/src/audio_core/renderer/system_manager.cpp): `src/audio_core/renderer/system_manager.cpp`

### Other components

- **Player**

## Connections

- Player → Qt frontend: uses
- Player → Android frontend: uses
- Qt frontend → Emulation core: starts emulation (evidence: `src/yuzu/bootmanager.cpp`)
- Android frontend → Emulation core: starts emulation
- Content manager → Emulation core: references core (evidence: `src/frontend_common/content_manager.h`)
- Play statistics service → Play-time tracking: queries statistics (evidence: `src/core/hle/service/ns/query_service.cpp`)
- Qt frontend → Player: signals lifecycle (evidence: `src/yuzu/bootmanager.cpp`)
- Qt controller UI → Emulated controllers: uses controller API (evidence: `src/yuzu/applets/qt_controller.cpp`)
- OpenGL pipelines → Shader optimization: uses shader IR
- Vulkan pipeline cache → Shader optimization: uses shader IR (evidence: `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp`)
- GPU driver management → Android frontend: manages drivers (evidence: `src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/DriverManagerFragment.kt`)
