- ImGuin examples project
- Try Wasm demo in your browser
- Usage: Sample program and run
- Prerequisites
- Frontends and Backends
- Build examples
- Available libraries
- Screenshot (examples)
- glfw_opengl3 / glfw_vulkan
- glfw_opengl3_imknobs
- glfw_opengl3_filedialog
- glfw_opengl3_imgui_toggle
- glfw_opengl3_imguiTextSelect
- glfw_opengl3_imspinner
- rlimgui_basic (Naylib / Raylib / rlImgui)
- glfw_opengl3_iconfont_viewer
- glfw_opengl3_image_load / sdl2_opengl3
- sdl2: opengl3 / renderer
- sdl3: opengl3 / renderer / sdlgpu3 / vulkan
- glfw_opengl3_image_save
- glfw_opengl3_jp
- glfw_opengl3_implot
- glfw_opengl3_implot3d
- glfw_opengl3_imnodes
- glfw_opengl3_imguizmo
- glfw_opengl3_imColorTextEdit
- glfw_opengl3_imgui_markdown
- Wasm example: glfw_opengl3_wasm_base
- My test app movie using imguin
- Cross compilation: Generating Windows application binary(*.exe) on Linux OS
- TODO
- Compressing binary file
- My tools version
- Other link
Confirmed ImGuin verion: v1.92.6.1
(Dear ImGui/CImGui version: 1.92.6dock) (2026/02)
This is example project to use Dear ImGui, ImPlot and so on in Nim language.
Wrapper libraies used are here ImGuin 1
Click link for live demo: glfw_opengl3_wasm_base

See Wasm-example: glfw_opengl3_wasm_base
-
Nim-2.2.8 or later
-
Windows11 MSys2/MinGW installed: Command line tools: make, python, cp, rm, git, ...etc
pacman -S mingw-w64-ucrt-x86_64-{gcc,glfw,SDL2,sdl3,pkgconf} make pacman -S mingw-w64-ucrt-x86_64-vulkan-{headers,loader} -
Linux: Debian / Ubuntu families
$ sudo apt install build-essential pkgconf $ sudo apt install lib{opengl-dev,gl1-mesa-dev,glfw3,glfw3-dev,xcursor-dev,xinerama-dev,xi-dev,sdl2-dev} git $ sudo apt install libvulkan-dev- See Install SDL3
| Frontends | Backends |
|---|---|
| GLFW | OpenGL3, Vulkan |
| SDL2 | OpenGL3, sdlrenderer2 |
| SDL3 | OpenGL3, sdlrenderer3, sdlgpu3, Vulkan |
| Wasm | WebGL 2.0 |
-
First clone this project,
git clone https://github.com/dinau/imguin_examples
-
Install dependencies libraries,
cd imguin_examples nimble refresh nimble install -d -
For instance glfw_opengl3_base.nim
pwd imguin_examples/glfw_opengl3_base make # or make run
After building, run
./glfw_opengl3_base(.exe)
Compilation options depend on./config.nimsand./Makefile. -
Selecting static link or dynamic link.
If you'd like to build executables with static link (not using*.dll),
edit./linkControl.nimin respective example folder.
To not depend on any other*.dllfiles,
change toconst STATIC_LINK_GLFW = true # if true, it doesn't need glfw3.dll const STATIC_LINK_CC = true # if true, it doesn't need libstd++-6.dll
Library name / C lang wrapper
- ImGui / CImGui
- ImPlot / CImPlot
- ImNodes / CImNodes
- ImGuizmo / CImGuizmo
- ImGui-Knobs / CImGui-Knobs
- ImGuiFileDialog / CImGuiFileDialog
- ImGui_Toggle / CimGui_Toggle
- ImPlot3d / CImPlot3d
- ImSpinner / CImSpinner
- ImGuiColorTextEdit / cimCTE (2025/03)
- ImGuiTextSelect / CImGuiTextSelect (2025/09)
- ImGui_Markdown / CImGui_Markdown WIP
Additional examples
These screenshots are on Windows10.
Basic example with icon fonts
-
Build
pwd glfw_opengl3 make # or nim c glfw_opengl3.nim
Vulkan
pwd glfw_vulkan make # or nim c glfw_vulkan.nim
cimgui-knobs sources have been contributed from system64MC / PR (2024/12). Thank you.
pwd
glfw_opengl3_imknobs
make # or nim c -d:ImKnobs glfw_opengl3_imknobs.nim ImGuiFileDialog / CImGuiFileDialog
pwd
glfw_opengl3_filedialog
make # or nim c -d:ImGuiFileDialog glfw_opengl3_filedialog.nim pwd
glfw_opengl3_imgui_toggle
make # or nim c -d:ImGuiToggle glfw_opengl3_imgui_toggle.nim pwd
glfw_opengl3_imguiTextSelect
make # or nim c -d:ImGuiTextSelect glfw_opengl3_imguiTextSelect.nim pwd
glfw_opengl3_imspinner
make # or nim c -d:ImSpinner glfw_opengl3_imspinner.nim pwd
rlimgui_basic
make # or nim c rlimgui_basic.nim Icon font viewer.
- Magnifying glass
- Incremantal search
pwd
iconFontViewer
make # or nim c iconFontViewer.nim - Image loading
- Magnifying glass
pwd
glfw_opengl3_image_load
make # or nim c glfw_opengl3_image_load.nim -
sdl2 version
pwd sdl2_opengl3 make # or nim c -d:SDL sdl2_opengl3.nim
-
Build sdl2 + OpenGL3 backend
cd sdl2_opengl3 make # or nim c -d:SDL sdl2_opengl3.nim
-
Build sdl2 renderer backend
cd sdl2_renderer make # or nim c -d:SDL sdl2_renderer.nim
-
Build SDL3 + OpenGL backend
See SDL3 installation on Linux OScd sdl3_opengl3 make # or nim c -d:SDL sdl3_opengl3.nim
-
Build SDL3 + SDL3 renderer backend
cd sdl3_renderer make # or nim c -d:SDL sdl3_renderer.nim
-
Build SDL3 + SDL3 GPU backend
cd sdl3_sdlgpu3 make # or nim c -d:SDL sdl3_sdlgpu3.nim
-
Build SDL3 + Vulkan backend
cd sdl3_vulkan make # or nim c -d:SDL -d:volk sdl3_vulkan.nim
- Image loading / saving
It can save a screenshot as [ jpg, bmp, png or tga ] file. - Magnifying glass
pwd
glfw_opengl3_image_save
make # or nim c glfw_opengl3_image_save.nimShowing UTF-8 text and input text with a local country language.

pwd
glfw_opengl3_jp
make # or nim c glfw_opengl3_jp.nimIf you are on Debian13 in WSL2 on Windows OS,
sudo apt install fonts-ipafontShowing ImGui demo with ImPlot demo.

pwd
glfw_opengl3_implot
make # or nim c -d:ImPlot glfw_opengl3_implot.nimShowing ImPlot3D demo. WIP
pwd
glfw_opengl3_implot3d
make # or nim c -d:ImPlot3D glfw_opengl3_implot3d.nimpwd
glfw_opengl3_imnodes
make # or nim c -d:ImNodes glfw_opengl3_imnodes.nimpwd
glfw_opengl3_imguizmo
make # or nim c -d:ImGuizmo glfw_opengl3_imguizmo.nimpwd
glfw_opengl3_imColorTextEdit
make # or nim c -d:ImColorTextEdit glfw_opengl3_imColorTextEdit.nimWIP at this moment.
pwd
glfw_opengl3_imgui_markdown
make # or nim c -d:ImGuiMarkdown glfw_opengl3_imgui_markdown.nim-
Install emcc compiler from emsdk
Reference to nim_emscripten_tutorial -
Confirm emcc version
$ emcc --version emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 5.0.4 (62e22652509fbe7a00609ce48a653d0d66f27ba5) --- snip ---
-
Build
contrib.glfw3$ embuilder build contrib.glfw3
-
Build example
pwd glfw_opengl3_wasm_base $ make # or nim c -d:strip -d:emscripten glfw_opengl3_wasm_base.nim
-
Run example in Web browser
$ make run python -m http.server 8000 Serving HTTP on :: port 8000 (http://[::]:8000/) ... ::ffff:127.0.0.1 - - [28/Mar/2026 19:25:12] "GET / HTTP/1.1" 200 - ::ffff:127.0.0.1 - - [28/Mar/2026 19:27:14] "GET /glfw_opengl3_wasm.html HTTP/1.1" 200 - ::ffff:127.0.0.1 - - [28/Mar/2026 19:27:14] "GET /glfw_opengl3_wasm.js HTTP/1.1" 200 - ::ffff:127.0.0.1 - - [28/Mar/2026 19:27:14] "GET /glfw_opengl3_wasm.wasm HTTP/1.1" 200 -
Click http://[::]:8000/ or http://[localhost]:8000/ or open it on your browser
and clickglfw_opengl3_wasm_base.html -
Genarete desktop application
$ make app
./glfw_opengl3_wasm_base(.exe)can be executed as desktop application.
-
See:
Cross compilation to Windows, linker error (unrecognized option '-z'
https://nim-lang.org/docs/nimc.html#crossminuscompilation-for-windows -
Download GLFW3 Windows pre-compiled binaries form here.
-
Extracts
glfw-3.4.bin.WIN64.zip -
cp glfw-3.4.bin.WIN64/lib-mingw-w64/{glfw3.dll,libglfw3dll.a} imguin_examples/glfw_opengl3/ -
Rename lib name
pwd imguin_examples/glfw_opengl3 mv libglfw3dll.a libglfw3.dll.a -
Edit
Makefile
Add the following line toimguin_examples/glfw_opengl3/MakefileOPT += -d:release OPT += --passL:"-L ." # <----- added line include ../makefile.common.mk -
Run make to build example
make win
or
nim c -d:mingw glfw_opengl3 or nim c --os:windows glfw_opengl3
glfw_opengl3.exewill be generated in the current folder.
- Can it compile with
zig cc? Done. But Zig lang. is very unstable at this time. - Whether can it use
cimgui.dll? (Now it can only be static link) Closed. Only be static link. - Easier compilation for SDL2 app. (2024/09) Done.
- Added: ImNodes/CImNodes (2023/10) Done
- Unfortunately Dear ImGui - 1.89.7 dosn't work well at this moment.(2023/07) Done. (2023/08)
- Whether can it do
nimble install imguin? Done (2023/09) (#Issue 13) - Add Font Awesome (Icon Font) demo. Done (2023/04).
- Can it compile with MSVC (--cc:vcc) ? Done. Except SDL2 demo. (2023/03), TODO (2024/09)
- Can it compile with Clang (--cc:clang) ? Done. (2023/03)
- Add SDL2 example. Done. sdl2_opengl3 (2023/03)
- First step has been done. (2023/03)
Install UPX with MSys console on WindowsOS,
pacman -S mingw-w64-x86_64-upxFor compression exe file,
pwd
examples
cd glfw_opengl3_implot
make upx Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.4 Markus Oberhumer, Laszlo Molnar & John Reiser May 9th 2024
File size Ratio Format Name
-------------------- ------ ----------- -----------
7117824 -> 1217024 17.10% win64/pe glfw_opengl3_implot.exe Decompressing,
make dupxResult in,
| GCC + UPX : GCC | Clang + UPX : Clang | MSVC(vcc) + UPX : MSVC | |
|---|---|---|---|
| glfw_opengl3.exe | 804 KB : 2360 KB | 720 KB : 2200 KB | 742 KB : 2070 KB |
| glfw_opengl3_implot.exe | 1220 KB : 7120 KB | 940KB : 4200 KB | 945 KB : 3810 KB |
GCC: v14.2.0, Clang: v18.1.8, MSVC: 2022
Windows11 (main)
- Nim Compiler Version 2.2.8
- GCC (Rev1, Built by MSYS2 project) 15.2.0
- Clang version 21.1.8
- Visual Studio C++/C 2022
- git version 2.46.0.windows.1
- Make: GNU Make 4.4.1
- MSys2/MinGW tools
WSL2 Linux OS: Debain 13
- Nim Compiler Version 2.2.6
- gcc 14.2.0
- make: GNU Make 4.4.1
- git version 2.47.3
-
File Dialog
-
Other
-
GUI
-
Graphical
| Language | Project | |
|---|---|---|
| Lua | Script | LuaJITImGui |
| NeLua | Compiler | NeLuaImGui / NeLuaImGui2 |
| Nim | Compiler | ImGuin, Nimgl_test, Nim_implot |
| Python | Script | DearPyGui for 32bit WindowsOS Binary |
| Ruby | Script | igRuby_Examples |
| Zig, C lang. | Compiler | Dear_Bindings_Build |
| Zig | Compiler | ImGuinZ |
| Language | SDL | Project | |
|---|---|---|---|
| LuaJIT | Script | SDL2 | LuaJIT-Platformer |
| Nelua | Compiler | SDL2 | NeLua-Platformer |
| Nim | Compiler | SDL3 / SDL2 | Nim-Platformer-sdl2/ Nim-Platformer-sdl3 |
| Ruby | Script | SDL3 | Ruby-Platformer |
| Zig | Compiler | SDL3 / SDL2 | Zig-Platformer |
- https://github.com/SpartanJ/SOIL2
SOIL2 is a tiny C library used primarily for uploading textures into OpenGL.
error: assignment to 'char **' from incompatible pointer type 'const char * const*' [-Wincompatible-pointer-types]type ConstCstring {.importc: const char *.} = cstringNotes:
- Using ImPlot3D / ImPlot with Nim
- Nim + ImGui + ImPlot3D / ImPlot demo
- Build with ImPlot3D / ImPlot
- ImPlot3D integration example
- This project builds and runs Dear ImGui + ImPlot3D / ImPlotusing Nim.
- ImPlot3D is compiled from source (implot3d.h / implot3d.cpp)
- ImPlot is compiled from source (implot.h / implot.cpp)
Footnotes
-
It may be better to use the mainstream project nimgl/imgui (ImGui v1.85)
,updated project nimgl-imgui (ImGui v1.89.9) ,sub project nim_implot and test project nimgl_test,
or https://github.com/daniel-j/nimgl-imgui(ImGui v1.91.1) ↩




















