This section is for developers willing to build and modify the imgui_bundle library. It covers topics such as building the library, updating dependencies, and adding new features or bindings.
Architecture Overview¶
ImGui Bundle implements a four-layer architecture:
Rendering Backends – GLFW/SDL + OpenGL/Metal/DirectX/Vulkan
Dear ImGui Core – immediate-mode widget system
Hello ImGui Framework – window lifecycle, docking, DPI handling, asset management
ImmApp Layer – simplified runner with automatic add-on initialization
Users can work at their preferred abstraction level, from raw ImGui calls to the high-level immapp.run() API.
Python Bindings¶
The bindings are auto-generated using litgen, a code generator that transforms C++ headers into:
nanobind C++ code – the actual binding implementation
.pyitype stubs – for IDE autocompletion and type checking
All 23+ C++ libraries compile into a single _imgui_bundle native extension, with submodules conditionally available based on build configuration.
Key Concepts¶
Add-On System: ImmApp manages automatic context creation for optional libraries via
AddOnsParamsflags (with_implot,with_markdown, etc.)Cross-Platform: Same codebase deploys to desktop (Windows/macOS/Linux), mobile (iOS/Android), and web (Emscripten/Pyodide)
DPI-Aware Sizing: Helper functions like
EmToVec2()enable responsive layouts across high-DPI displays
More Resources¶
DeepWiki - ImGui Bundle – AI-powered documentation explorer for in-depth architecture questions
Litgen Documentation – the bindings generator used by this project
In This Section¶
Repository Structure – folder organization
Bindings Introduction – how the generator works
Update Bindings – updating existing library bindings
Add New Library – adding a new library to the bundle
Debug Native C++ – debugging C++ code from Python