#raylib #imgui #graphics #gamedev

raylib_imgui

A Raylib based backend for imgui

1 stable release

new 1.0.1 Apr 23, 2025

#915 in GUI

Download history 88/week @ 2025-04-18

88 downloads per month

Custom license

25KB
589 lines

raylib_imgui

Crates.io Version

raylib logo animated A Raylib integration with DearImGui in Rust!

Based on rlImgui

In main.rs:

use raylib_imgui::RaylibGui;
use raylib::prelude::*;

fn main() {
  let (mut rl, thread) = raylib::init()
    .size(800, 600)
    .title("Demo window")
    .build();

  let mut gui = RaylibGui::new(&mut rl, &thread);
  let mut open = true;

  while !rl.window_should_close() {
    let ui = gui.begin(&mut rl);
    ui.show_demo_window(&mut open);
    // Draw ImGui stuff here

    let mut d = rl.begin_drawing(&thread);
    d.clear_background(Color::WHITE);
    // Draw raylib stuff here

    gui.end();
  }
}

Dependencies

~18–25MB
~368K SLoC