| Crates.io | dear-app |
| lib.rs | dear-app |
| version | 0.8.0 |
| created_at | 2025-10-06 16:36:07.132654+00 |
| updated_at | 2026-01-02 18:20:42.805795+00 |
| description | Convenient Dear ImGui application runner for dear-imgui-rs (Winit + WGPU, docking, themes, add-ons) |
| homepage | https://github.com/Latias94/dear-imgui-rs |
| repository | https://github.com/Latias94/dear-imgui-rs |
| max_upload_size | |
| id | 1870401 |
| size | 135,040 |
Convenient Dear ImGui application runner for dear-imgui-rs, bundling Winit + WGPU setup into a tiny API. It hides boilerplate, exposes ergonomic callbacks, and can initialize popular add-ons (ImPlot, ImNodes, ImPlot3D) behind feature flags.
run_simple) and a configurable builder (AppBuilder)implot, imnodes, implot3d[dependencies]
dear-app = "0.8"
# Optional add-ons (enable any subset)
dear-app = { version = "0.8", features = ["implot", "imnodes", "implot3d"] }
Minimal usage:
use dear_app::run_simple;
use dear_imgui_rs::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
run_simple(|ui| {
ui.window("Hello")
.size([360.0, 160.0], Condition::FirstUseEver)
.build(|| ui.text("Hello from dear-app!"));
})?;
Ok(())
}
Tip: pass .opened(&mut open) if you want a title-bar close button (X), and stop submitting the window when open == false.
Builder with add-ons and docking/theme presets:
use dear_app::{AppBuilder, AddOnsConfig, RunnerConfig, Theme};
use dear_imgui_rs as imgui;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = RunnerConfig { theme: Some(Theme::Dark), ..Default::default() };
let addons = AddOnsConfig::auto(); // enable compiled add-ons
AppBuilder::new()
.with_config(cfg)
.with_addons(addons)
.on_frame(|ui: &imgui::Ui, addons| {
ui.window("App").build(|| {
ui.text("Docking and WGPU are ready!");
#[cfg(feature = "implot")]
if let Some(pc) = addons.implot { let plot = ui.implot(pc); let _ = plot; }
#[cfg(feature = "imnodes")]
if let Some(nc) = addons.imnodes { let _ = nc; /* ui.imnodes(nc) ... */ }
#[cfg(feature = "implot3d")]
if let Some(pc3) = addons.implot3d { let _ = pc3; }
});
})
.run()?;
Ok(())
}
dear-imgui-winit and dear-imgui-wgpu internally.on_fonts callback; FreeType can be enabled via dear-imgui-rs/freetype.