Separated module from NimGL. In order to maintain small sized modules to facilitate development and reduce number of required modules.
Some developers do not require the entire bundle of APIs that NimGL offers, and so, prefer to only download the required modules.
Updated Dear ImGui (CImGui) to 1.93.1 WIP dock (docking branch) (2026/11).
The bindings support two ways of linking against cimgui:
When compiled with nim cpp (and without -d:cimguiDLL), the cimgui /
Dear ImGui C++ sources under src/imgui/private/cimgui/ are compiled and
linked directly into your binary.
When compiled with nim c, or with -d:cimguiDLL, the bindings load
cimgui.dll (Windows), cimgui.so (Linux) or cimgui.dylib (macOS) at
runtime.
Build the shared library from src/imgui/private/cimgui/ with
nimlbe cimguiand place it next to your executable.
You can install this package through the official package manager of Nim.
$ nimble install https://github.com/nimgl/imgui.gitIn order to respect already existing libraries in the package registry, and because NimGL already exists in there, this package is only able to be accessible by direct git url.
$ git clone --recursive -j8 https://github.com/nimgl/imgui.git
$ cd imgui
$ nimble install$ nimble install nimglYou can find more information in the main repo.
$ nimble test # opens a window with the ImGui demo (GLFW + OpenGL)
$ nimble ci # headless null-backend demoDepending on the compilation backend, different prerequisites are needed:
The cimgui renderer backend (imgui_impl_glfw.cpp) is compiled from source and
requires the GLFW 3 development headers and import library :
- Windows (MSYS2):
pacman -S mingw-w64-ucrt-x86_64-glfw - Linux: install the GLFW development package, e.g.
sudo apt install libglfw3 libglfw3-dev(Debian/Ubuntu) or the equivalent package of your distribution.
Build the shared library beforehand and place it next to your executable:
$ nimble cimgui # builds src/imgui/private/cimgui/build/cimgui.dll via CMake
# and copies it to tests/Alternatively, build it manually with make inside
src/imgui/private/cimgui/ or with CMake directly.
The Nim bindings in src/imgui.nim are generated from the cimgui headers by
tools/generator.nim:
$ make gen # runs: nimble gen (nim c -r tools/generator.nim)It is currently being developed and tested on
- Windows 11
- ~MacOS Mojave~~
- Linux Debian 13
I'm only one person and I use this library almost daily for school and personal projects. If you are missing some extension, procedures, bindings or anything related feel free to PR them or open an Issue with the specification and if you can some examples to have an idea on how to implement it. Thank you so much 🎉
Please open all issues in the main repository. The PRs and new feature development will occur in each binding's repo.
See the examples in the main repository for usage.
Check out the references and doc in order to understand ImGui usage.
NimGL is open source and is under the MIT License, we highly encourage every developer that uses it to make improvements and fork them here.
Thank you to every contributor that has spent their time improving this library.