#gui-applications #imgui #gui-framework #ui #graphics #winit-window

easy-imgui-window

Default windowing for the easy-imgui crate using winit and easy-imgui-renderer

21 releases (12 breaking)

new 0.13.0 Jan 15, 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

#958 in GUI

Download history 73/week @ 2024-09-27 159/week @ 2024-10-04 40/week @ 2024-10-11 4/week @ 2024-10-18 136/week @ 2024-10-25 44/week @ 2024-11-01 116/week @ 2024-11-08 13/week @ 2024-11-15 8/week @ 2024-11-22 3/week @ 2024-11-29 118/week @ 2024-12-06 73/week @ 2024-12-13 4/week @ 2024-12-20 32/week @ 2024-12-27 7/week @ 2025-01-03 48/week @ 2025-01-10

93 downloads per month
Used in easy-imgui-filechooser

MIT license

9.5MB
126K SLoC

C++ 106K SLoC // 0.2% comments Visual Studio Project 7.5K SLoC Rust 7K SLoC // 0.0% comments Objective-C++ 3.5K SLoC // 0.2% comments C 731 SLoC // 0.3% comments Batch 443 SLoC Visual Studio Solution 401 SLoC GLSL 150 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.7.

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

~7–24MB
~410K SLoC