22 releases (13 breaking)

0.14.0 Feb 20, 2025
0.12.0 Dec 12, 2024
0.11.0 Nov 8, 2024
0.6.1 Jul 10, 2024
0.2.4 Mar 22, 2024

#144 in GUI

Download history 18/week @ 2024-11-20 13/week @ 2024-11-27 40/week @ 2024-12-04 191/week @ 2024-12-11 19/week @ 2024-12-18 4/week @ 2024-12-25 5/week @ 2025-01-01 28/week @ 2025-01-08 138/week @ 2025-01-15 6/week @ 2025-01-22 15/week @ 2025-01-29 26/week @ 2025-02-05 12/week @ 2025-02-12 154/week @ 2025-02-19 25/week @ 2025-02-26 7/week @ 2025-03-05

200 downloads per month
Used in 3 crates

MIT license

9MB
125K SLoC

C++ 107K SLoC // 0.2% comments Visual Studio Project 7.5K SLoC Rust 5.5K SLoC // 0.1% comments Objective-C++ 3.5K SLoC // 0.2% comments C 731 SLoC // 0.3% comments Batch 443 SLoC Visual Studio Solution 401 SLoC GLSL 129 SLoC Kotlin 59 SLoC // 0.1% comments Shell 3 SLoC // 0.7% comments GDB Script 1 SLoC // 0.9% comments

easy-imgui-rs

build

Build full GUI applications with Rust and Dear ImGui. It currently uses version v1.91.8.

There are several crates in this repository:

See some examples at the examples directory. The simplest one is just a few lines of code:

use easy_imgui_window::{MainWindow, MainWindowWithRenderer,
    winit::event_loop::EventLoopBuilder,
    easy_imgui as imgui,
};

fn main() {
    let event_loop = EventLoopBuilder::new().build().unwrap();
    let main_window = MainWindow::new(&event_loop, "Example").unwrap();
    let mut window = MainWindowWithRenderer::new(main_window);

    let mut app = App;

    event_loop.run(move |event, w| {
        let res = window.do_event(&mut app, &event, w);
        if res.is_break() {
            w.exit();
        }
    }).unwrap();
}

struct App;

impl imgui::UiBuilder for App {
    fn do_ui(&mut self, ui: &imgui::Ui<Self>) {
        ui.show_demo_window(None);
    }
}

Dependencies