| Crates.io | dear-imgui |
| lib.rs | dear-imgui |
| version | 0.1.0 |
| created_at | 2025-09-13 17:23:35.075148+00 |
| updated_at | 2025-09-13 17:23:35.075148+00 |
| description | High-level Rust bindings to Dear ImGui with docking support |
| homepage | https://github.com/Latias94/dear-imgui |
| repository | https://github.com/Latias94/dear-imgui |
| max_upload_size | |
| id | 1837939 |
| size | 573,265 |
Modern Rust bindings for Dear ImGui with full Dear ImGui v1.92+ support, including dynamic font system, advanced docking, and modern texture management.

This project provides comprehensive Rust bindings for Dear ImGui v1.92+, featuring:
ImGuiBackendFlags_RendererHasTextures, and modern texture managementNote: Multi-viewport support is not currently implemented but may be added in future releases.
dear-imgui/
├── dear-imgui/ # High-level safe Rust bindings
├── dear-imgui-sys/ # Low-level FFI bindings to Dear ImGui C++
├── backends/
│ ├── dear-imgui-wgpu/ # WGPU renderer backend
│ ├── dear-imgui-glow/ # OpenGL renderer backend
│ └── dear-imgui-winit/ # Winit platform integration
└── extensions/
├── dear-imguizmo/ # 3D gizmo manipulation (Work in progress)
└── dear-implot/ # Advanced plotting library
Add to your Cargo.toml:
[dependencies]
dear-imgui = "0.1"
dear-imgui-wgpu = "0.1"
dear-imgui-winit = "0.1"
Basic WGPU example:
use dear_imgui::*;
use dear_imgui_wgpu::{WgpuRenderer, WgpuInitInfo};
let mut imgui = Context::create()?;
let mut renderer = WgpuRenderer::new(init_info, &mut imgui)?;
// Main loop
let ui = imgui.frame();
ui.window("Hello World")
.size([300.0, 100.0], Condition::FirstUseEver)
.build(|| {
ui.text("Hello, world!");
if ui.button("Click me") {
println!("Button clicked!");
}
});
let draw_data = imgui.render();
renderer.render(&draw_data, &render_pass);
Run the included examples to see features in action:
cargo run --bin wgpu_basic # Basic WGPU integration
cargo run --bin glow_basic # Basic Glow integration
cargo run --bin game_engine_docking # Advanced docking layout
cargo run --bin implot_basic # Plotting with dear-implot
Add this to your Cargo.toml:
[dependencies]
dear-imgui = "0.1"
dear-imgui-wgpu = "0.1" # For WGPU backend
dear-imgui-winit = "0.1" # For Winit integration
Or for OpenGL support:
[dependencies]
dear-imgui = "0.1"
dear-imgui-glow = "0.1" # For OpenGL backend
dear-imgui-winit = "0.1" # For Winit integration
This library implements Dear ImGui v1.92+'s ImGuiBackendFlags_RendererHasTextures system, enabling:
dear-imgui-sys)Direct C++ FFI bindings with MSVC ABI compatibility fixes, handling complex return types and ensuring cross-platform stability.
dear-imgui)Type-safe Rust API featuring:
This project builds upon the excellent work of several other projects:
This project is licensed under MIT OR Apache-2.0.
git clone https://github.com/Latias94/dear-imgui
cd dear-imgui
git submodule update --init --recursive
cargo build
cargo test
cargo run --example wgpu_basic
Advantages:
Current Status:
Choose this library if you need the latest Dear ImGui features, docking support, or want to work with modern Rust graphics libraries.
One of the key technical challenges in creating Rust bindings for C++ libraries is handling ABI (Application Binary Interface) compatibility issues. This is particularly problematic on MSVC where small C++ class return types can cause crashes.
Our solution, inspired by easy-imgui-rs, includes:
ImVec2 to POD equivalentsSee dear-imgui-sys/README.md for detailed technical information.