{"id":13459797,"url":"https://github.com/dinau/dear_bindings_build","last_synced_at":"2026-01-02T00:12:47.408Z","repository":{"id":242207640,"uuid":"808969245","full_name":"dinau/dear_bindings_build","owner":"dinau","description":"ImGui: Simple dear_bindings build project","archived":false,"fork":false,"pushed_at":"2024-06-17T09:08:24.000Z","size":37929,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T19:14:25.611Z","etag":null,"topics":["c-language","cimgui","clang","gcc","glfw","gui","imgui","makefile","mingw","msys2","opengl","sdl","sdl2","sdl3","windows","windowsos","zig"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dinau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T10:02:11.000Z","updated_at":"2024-06-17T08:59:01.000Z","dependencies_parsed_at":"2024-10-12T17:03:47.934Z","dependency_job_id":"38d7528d-bd5f-4d73-ad83-c2733f2239e2","html_url":"https://github.com/dinau/dear_bindings_build","commit_stats":null,"previous_names":["dinau/dear_bindings_build"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fdear_bindings_build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fdear_bindings_build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fdear_bindings_build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fdear_bindings_build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinau","download_url":"https://codeload.github.com/dinau/dear_bindings_build/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243500772,"owners_count":20300770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-language","cimgui","clang","gcc","glfw","gui","imgui","makefile","mingw","msys2","opengl","sdl","sdl2","sdl3","windows","windowsos","zig"],"created_at":"2024-07-31T10:00:29.326Z","updated_at":"2026-01-02T00:12:47.402Z","avatar_url":"https://github.com/dinau.png","language":"C","funding_links":[],"categories":["Other link"],"sub_categories":["Update / Downgrade  ImGui/CImGui"],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Dear_Bindings_Build](#dear_bindings_build)\n  - [Zig fetch](#zig-fetch)\n  - [Frontends and Backends](#frontends-and-backends)\n  - [Available libraries list at this moment](#available-libraries-list-at-this-moment)\n  - [Prerequisites](#prerequisites)\n  - [Compiling](#compiling)\n  - [Build and run](#build-and-run)\n  - [Examples screen shots](#examples-screen-shots)\n    - [zig_imknobs](#zig_imknobs)\n    - [zig_imtoggle](#zig_imtoggle)\n    - [zig_imspinner](#zig_imspinner)\n    - [Raylib example](#raylib-example)\n    - [Raylib + ImGui + rlImGui](#raylib--imgui--rlimgui)\n    - [zig_imfiledialog](#zig_imfiledialog)\n    - [zig_imgui_markdown](#zig_imgui_markdown)\n    - [zig_iconfontviewer](#zig_iconfontviewer)\n    - [zig_imcolortextedit](#zig_imcolortextedit)\n    - [zig_imguizmo](#zig_imguizmo)\n    - [zig_imnodes](#zig_imnodes)\n    - [zig_implot / zig_implot3d](#zig_implot--zig_implot3d)\n    - [Image load / save (OpenGL, SDL3, SDL3GPU)](#image-load--save-opengl-sdl3-sdl3gpu)\n    - [zig_glfw_opengl3](#zig_glfw_opengl3)\n  - [Hiding console window](#hiding-console-window)\n  - [SDL libraries](#sdl-libraries)\n  - [My tools version](#my-tools-version)\n  - [Similar project ImGui / CImGui](#similar-project-imgui--cimgui)\n  - [SDL game tutorial Platfromer](#sdl-game-tutorial-platfromer)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n### Dear_Bindings_Build\n\nThis project aims to simply and easily build [Dear ImGui](https://github.com/ocornut/imgui) examples with **C** and **Zig** using [Dear_Bindings](https://github.com/dearimgui/dear_bindings) as first step.\nAnd one can use many other libaries and examples with less external dependencies.\n\n[DearBindings](https://github.com/dearimgui/dear_bindings): dear_bindings_v0.17_ImGui_v1.92.4-docking  \n[Dear ImGui](https://github.com/ocornut/imgui): 1.92.4\n\n#### Zig fetch\n\n---\n\n1. Zig fetch `dear_bindings_build`\n\n   ```sh\n   mkdir myapp\n   cd myapp\n   zig init\n   \n   zig fetch --save git+https://github.com/dinau/dear_bindings_build\n   ```\n\n1. Add dependencies to `build.zig`\n\n   ```zig\n   const dear_bindings_build = b.dependency(\"dear_bindings_build\", .{});\n   const dependencies = .{\n       \"appimgui\",      // Simple app framework\n       \"imspinner\",     // ImSpinner\n       \"imknobs\",       // ImKnobs\n       \"imtoggle\",      // ImToggle\n    // \"another_lib\",\n   };\n   inline for (dependencies) |dep_name| {\n       const dep = dear_bindings_build.builder.dependency(dep_name, .{\n           .target = target, \n           .optimize = optimize, \n       });\n       exe.root_module.addImport(dep_name, dep.module(dep_name));\n   }\n   exe.subsystem = .Windows; // Hide console window\n   ```\n\n   You can set `dependencies` (additional libraries), see [dear_bindings_build/build.zig.zon](https://github.com/dinau/dear_bindings_build/blob/main/build.zig.zon)\n\n   ```zig\n   \"appimgui\"     \u003c- Simple app framework for GLFW and OpenGL backend\n   \"imspinner\"    \u003c- ImSpinner\n   \"imguizmo\"     \u003c- ImGuizmo\n   \"imknobs\"      \u003c- ImKnobs \n   \"imnodes\"      \u003c- ImNodes\n   \"implot\"       \u003c- ImPlots\n   \"implot3d\"     \u003c- ImPlot3D\n   \"imtoggle\"     \u003c- ImToggle\n   \"rlimgui\"      \u003c- rlImgui\n   ... snip  ...\n   ```\n\n1. Edit src/main.zig\n\n   ```zig\n   const app = @import(\"appimgui\");\n   const ig = app.ig;\n   const spinner = @import(\"imspinner\"); // ImSpinner\n   const knobs = @import(\"imknobs\"); // ImKnobs\n   const tgl = @import(\"imtoggle\"); // ImToggle\n   \n   // gui_main()\n   pub fn gui_main(window: *app.Window) void {\n       var col: f32 = 1.0;\n       var fspd: bool = false;\n       var speed: f32 = 2.0;\n       var spn_col: spinner.ImColor = .{ .Value = .{ .x = col, .y = 1.0, .z = 1.0, .w = 1.0 } };\n       while (!window.shouldClose()) { // main loop\n           window.pollEvents();\n           window.frame(); // Start ImGui frame\n   \n           ig.ImGui_ShowDemoWindow(null); // Show ImGui demo window\n   \n           ig.ImGui_SetNextWindowSize(.{ .x = 0.0, .y = 0.0 }, 0); // Fit window size depending on the size of the widgets\n           _ = ig.ImGui_Begin(\"Demo\", null, 0); // Show demo window\n           spinner.SpinnerAtomEx(\"atom\", 16, 2, spn_col, speed, 3);\n           ig.ImGui_SameLine();\n           _ = tgl.Toggle(\"Speed\", \u0026fspd, .{ .x = 0.0, .y = 0.0 });\n           if (fspd) speed = 6.0 else speed = 2.0;\n           if (knobs.IgKnobFloat(\"Color\", \u0026col, 0.0, 1.0, 0.05, \"%.2f\", knobs.IgKnobVariant_Stepped, 0, 0, 10, -1, -1)) {\n               spn_col.Value.x = col;\n           }\n           ig.ImGui_End();\n   \n           window.render(); // render\n       } // end while loop\n   }\n   \n   pub fn main() !void {\n       var window = try app.Window.createImGui(1024, 900, \"ImGui window in Zig lang.\");\n       defer window.destroyImGui();\n   \n       _ = app.setTheme(.dark); // Theme: dark, classic, light, microsoft\n   \n       gui_main(\u0026window); // GUI main proc\n   }\n   ```\n\n1. Build and run\n  \n   ```sh\n   pwd\n   myapp\n\n   zig build run     # or zig build --release=fast\n\n   ```\n   \n   ![myapp.png](img/myapp.png)\n\n#### Frontends and Backends  \n\n---\n\n| Frontends |      Backends     |\n|-----------|:-----------------:|\n| GLFW3     |   OpenGL3, SDL3   |\n| SDL3      |  OpenGL3, SDL3GPU |\n| Win32     | DirectX 11(D3D11) |\n  \n\n#### Available libraries list at this moment\n\n---\n\nLibrary name / C lang. wrapper\n\n- [x] [ImGui](https://github.com/ocornut/imgui) / [Dear_Bindings](https://github.com/dearimgui/dear_bindings)\n- [x] [ImGui-Knobs](https://github.com/altschuler/imgui-knobs) / [CImGui-Knobs](libs/cimgui-knobs) (2025/07)\n- [x] [ImGuiFileDialog](https://github.com/aiekick/ImGuiFileDialog) / [CImGuiFileDialog](https://github.com/dinau/CImGuiFileDialog) (2025/07)\n- [x] [ImGui_Toggle](https://github.com/cmdwtf/imgui_toggle) / [CimGui_Toggle](https://github.com/dinau/cimgui_toggle) (2025/07)\n- [x] [ImSpinner](https://github.com/dalerank/imspinner) / [CImSpinner](https://github.com/dinau/cimspinner) (2025/07)\n- [x] [ImGuiColorTextEdit](https://github.com/santaclose/ImGuiColorTextEdit) / [cimCTE](https://github.com/cimgui/cimCTE) (2025/08)\n- [x] [ImGuizmo](https://github.com/CedricGuillemet/ImGuizmo) / [CImGuizmo](https://github.com/cimgui/cimguizmo) (2025/08)\n- [x] [ImNodes](https://github.com/Nelarius/imnodes) / [CImNodes](https://github.com/cimgui/cimnodes) (2025/08)\n- [x] [ImPlot](https://github.com/epezent/implot) / [CImPlot](https://github.com/cimgui/cimplot) (2025/08)\n- [x] [ImPlot3d](https://github.com/brenocq/implot3d) / [CImPlot3d](https://github.com/cimgui/cimplot3d)  (2025/08)\n- [ ] [ImGui_Markdown](https://github.com/enkisoftware/imgui_markdown) (2025/09 WIP) \n\nAdditional examples\n- [x] [Raylib](https://github.com/raysan5/raylib), [raylib-zig](https://github.com/raylib-zig/raylib-zig), [rlImGui](https://github.com/raylib-extras/rlImGui) (2025/11)\n\n#### Prerequisites\n\n---\n\n- Install Zig Compiler  \n   Windows: [zig-x86_64-windows-0.15.2.zip](https://ziglang.org/download/0.15.2/zig-x86_64-windows-0.15.2.zip)  \n   Linux:   [zig-x86_64-linux-0.15.2.tar.xz](https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz)\n\n- Windows11  \n   - Optional: MSys2/MinGW basic commands (make, rm, cp ...)\n\n      ```sh\n      pacman -S make \n      ```\n\n- Linux OS: Debian13 Trixie / Ubuntu families\n\n   ```sh\n   sudo apt install make gcc lib{opengl-dev,gl1-mesa-dev,glfw3,glfw3-dev}\n   ```\n   \n   - SDL3  \n   If you are using Debian13 Trixie, add\n\n      ```sh\n      sudo apt install libsdl3-dev\n      ```\n\n      otherwise [install SDL3 manually](https://github.com/dinau/sdl3_nim#for-linux-os)\n\n#### Compiling \n\n---\n\n- Zig compiler\n\n   | Example name    | Windows | Linux  | \n   | ---             | :----:  | :----: | \n   | zig_*           | Y       | Y      | \n\n- Zig cc compiler\n\n   Using Zig module in C source code.\n\n   | example | Windows | Linux  | \n   | ---     | :----:  | :----: | \n   | glfw_*  | Y       | Y      | \n   | sdl3_*  | Y       | WIP    | \n   | win32_* | Y       | -      | \n\n#### Build and run\n\n---\n\n```sh\ngit clone https://github.com/dinau/dear_bindings_build\n\ncd dear_bindings_build/examples/glfw_opengl3           # for example\nzig build run --release=fast                           # or make run\n```\n\n#### Examples screen shots \n\n##### zig_imknobs\n\n---\n\n [zig_imknobs](examples/zig_imknobs/src/main.zig) \n\n![alt](img/zig_imknobs.png)\n\n##### zig_imtoggle\n\n---\n\n[zig_imtoggle](examples/zig_imtoggle/src/main.zig) \n\n![alt](img/zig_imtoggle.png)\n\n##### zig_imspinner\n\n---\n\n[zig_imspinner](examples/zig_imspinner/src/main.zig) \n\n![alt](img/zig_imspinner.gif)\n\n##### Raylib example \n\n---\n\n[raylib_basic](examples/zig_raylib_basic/src/main.zig)  \n\n\n![alt](https://github.com/dinau/imguinz/raw/main/img/raylib_basic.gif)\n\n[raylib_cjk](examples/zig_raylib_cjk/src/main.zig): Showing multi byte(CJK) fonts\n\n![alt](https://github.com/dinau/imguinz/raw/main/img/raylib_cjk.gif)\n\n##### Raylib + ImGui + rlImGui \n\n---\n\n[main.zig](examples/zig_rlimgui_basic/src/main.zig)  \n\n\n![alt](https://github.com/dinau/imguin_examples/raw/main/img/rlimgui.gif)\n\n##### zig_imfiledialog\n\n---\n\n[zig_imfiledialog](examples/zig_imfiledialog/src/main.zig) \n\n![alt](img/zig_imfiledialog.png)\n\n##### zig_imgui_markdown\n\n---\n\n- [x] Work in progress\n\n[zig_imgui_markdown](examples/zig_imgui_markdown/src/main.zig) \n\n![alt](https://github.com/dinau/cimgui_markdown/raw/main/demo/img/cimgui_markdown.png)\n\n##### zig_iconfontviewer\n\n---\n\n[zig_iconfontviewer](examples/zig_iconfontviewer/src/main.zig) \n\n- [x] Incremantal search \n- [x] Magnifing glass\n\n![alt](img/zig_iconfontviewer.png)\n\n##### zig_imcolortextedit\n\n---\n\n[zig_imcolortextedit](examples/zig_imcolortextedit/src/main.zig) \n\n![alt](img/zig_imcolortextedit.png)\n\n##### zig_imguizmo\n\n---\n\n[zig_imguizmo](examples/zig_imguizmo/src/main.zig) \n\n![alt](img/zig_imguizmo.png)\n\n##### zig_imnodes\n\n---\n\n[zig_imnodes](examples/zig_imnodes/src/main.zig) \n\n![alt](img/zig_imnodes.png)\n\n##### zig_implot / zig_implot3d\n\n---\n\n[zig_implot](examples/zig_implot/src/main.zig) /  [zig_implot3d](examples/zig_implot3d/src/main.zig) \n\n[zig_imPlotDemo](examples/zig_imPlotDemo/src/demoAll.zig) written in Zig.\n\n![alt](img/zig_implot3d.gif)  \n![alt](img/zig_implot.png)\n\n##### Image load / save (OpenGL, SDL3, SDL3GPU)\n\n---\n\n|  Language |                                                                             GLFW | Magnifing glass | Image load /save |\n|:---------:|---------------------------------------------------------------------------------:|:---------------:|:----------------:|\n|  C lang.  |                      [glfw_opengl3_image_load](examples/glfw_opengl3_image_load) |        -        |         Y        |\n|  C lang.  |                      [glfw_opengl3_image_save](examples/glfw_opengl3_image_save) |        -        |         Y        |\n| Zig lang. | [zig_glfw_opengl3_image_load](examples/zig_glfw_opengl3_image_load/src/main.zig) |        Y        |         Y        |\n| Zig lang. |                       [zig_sdl3_sdlgup3](examples/zig_sdl3_sdlgpu3/src/main.zig) |        -        |       load       |\n\n- [x] Image file captured will be saved in current folder.  \n- [x] Image format can be selected from `JPEG / PNG / BMP / TGA`.\n\n![alt](img/glfw_opengl3_image_load.png)\n\n##### zig_glfw_opengl3\n\n---\n\n- [x] Basic example\n\n|  Language |                                                                               GLFW |                                                       SDL3 |\n|:---------:|-----------------------------------------------------------------------------------:|-----------------------------------------------------------:|\n|  C lang.  | [glfw_opengl3](examples/glfw_opengl3), [glfw_opengl3_jp](examples/glfw_opengl3_jp) |                      [sdl3_opengl3](examples/sdl3_opengl3) |\n| Zig lang. |                         [zig_glfw_opengl3](examples/zig_glfw_opengl3/src/main.zig) | [zig_sdl3_opengl3](examples/zig_sdl3_opengl3/src/main.zig) |\n\n\n![alt](img/glfw_opengl3.png) ![alt](img/glfw_opengl3_jp.png)\n\n#### Hiding console window\n\n---\n\n- Zig lang. examples  \nOpen `build.zig` in each example folder and **enable** option line as follows,\n\n  ```zig\n  ... snip ...\n  exe.subsystem = .Windows;  // Hide console window\n  ... snip ...\n  ```\n\n  and execute `make`.\n\n\n- C lang. examples  \nOpen `Makefile` in each example folder and **change** option as follows,\n\n  ```Makefile\n  ... snip ...\n  HIDE_CONSOLE_WINDOW = true\n  ... snip ...\n  ```\n\n  and execute `make`.\n\n#### SDL libraries\n\n---\n\nhttps://github.com/libsdl-org/SDL  \nhttps://github.com/libsdl-org/SDL/releases\n\n#### My tools version\n\n---\n\n- gcc.exe (Rev2, Built by MSYS2 project) 15.2.0\n- make: GNU Make 4.4.1\n- Python 3.12.10\n\n#### Similar project ImGui / CImGui\n\n---\n\n| Language             |          | Project                                                                                                                                         |\n| -------------------: | :---:    | :----------------------------------------------------------------:                                                                              |\n| **Lua**              | Script   | [LuaJITImGui](https://github.com/dinau/luajitImGui)                                                                                             |\n| **NeLua**            | Compiler | [NeLuaImGui](https://github.com/dinau/neluaImGui)                                                                                               |\n| **Nim**              | Compiler | [ImGuin](https://github.com/dinau/imguin), [Nimgl_test](https://github.com/dinau/nimgl_test), [Nim_implot](https://github.com/dinau/nim_implot) |\n| **Python**           | Script   | [DearPyGui for 32bit WindowsOS Binary](https://github.com/dinau/DearPyGui32/tree/win32)                                                         |\n| **Ruby**             | Script   | [igRuby_Examples](https://github.com/dinau/igruby_examples)                                                                                     |\n| **Zig**, C lang.     | Compiler | [Dear_Bindings_Build](https://github.com/dinau/dear_bindings_build)                                                                             |\n| **Zig**              | Compiler | [ImGuinZ](https://github.com/dinau/imguinz)                                                                                                     |\n\n\n#### SDL game tutorial Platfromer\n\n---\n\n![ald](https://github.com/dinau/nelua-platformer/raw/main/img/platformer-nelua-sdl2.gif)\n\n\n| Language    |          | SDL         | Project                                                                                                                                               |\n| -------------------: | :---:    | :---:       | :----------------------------------------------------------------:                                                                                    |\n| **LuaJIT**           | Script   | SDL2        | [LuaJIT-Platformer](https://github.com/dinau/luajit-platformer)\n| **Nelua**            | Compiler | SDL2        | [NeLua-Platformer](https://github.com/dinau/nelua-platformer)\n| **Nim**              | Compiler | SDL3 / SDL2 | [Nim-Platformer-sdl2](https://github.com/def-/nim-platformer)/ [Nim-Platformer-sdl3](https://github.com/dinau/sdl3_nim/tree/main/examples/platformer) |\n| **Ruby**             | Script   | SDL3        | [Ruby-Platformer](https://github.com/dinau/ruby-platformer)                                                                                           |\n| **Zig**              | Compiler | SDL3 / SDL2 | [Zig-Platformer](https://github.com/dinau/zig-platformer)                                                                                             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fdear_bindings_build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinau%2Fdear_bindings_build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fdear_bindings_build/lists"}