#graphical-user-interface #imgui #graphics #ui

sys easy-imgui-sys

Low level bindings for the Dear ImGui C++ library

23 releases (14 breaking)

0.15.0 Mar 29, 2025
0.13.0 Jan 15, 2025
0.12.0 Dec 12, 2024
0.11.0 Nov 8, 2024
0.2.4 Mar 22, 2024

#1688 in GUI

Download history 43/week @ 2024-12-16 144/week @ 2024-12-23 22/week @ 2024-12-30 59/week @ 2025-01-06 161/week @ 2025-01-13 20/week @ 2025-01-20 13/week @ 2025-01-27 26/week @ 2025-02-03 13/week @ 2025-02-10 149/week @ 2025-02-17 31/week @ 2025-02-24 15/week @ 2025-03-03 14/week @ 2025-03-10 9/week @ 2025-03-17 118/week @ 2025-03-24 35/week @ 2025-03-31

176 downloads per month
Used in 4 crates (3 directly)

MIT license

9MB
120K SLoC

C++ 107K SLoC // 0.2% comments Visual Studio Project 7.5K SLoC Objective-C++ 3.5K SLoC // 0.2% comments C 732 SLoC // 0.3% comments Batch 444 SLoC Visual Studio Solution 402 SLoC Rust 169 SLoC // 0.1% comments GLSL 130 SLoC Kotlin 60 SLoC // 0.1% comments Shell 4 SLoC // 0.7% comments GDB Script 2 SLoC // 0.9% comments

Contains (static library, 295KB) glfw3.lib, (static library, 295KB) glfw3.lib, (static library, 190KB) glfw3.lib, (static library, 190KB) glfw3.lib

easy-imgui-rs

build

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

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