#raylib #imgui #graphics #gamedev

raylib_imgui

A Raylib based backend for imgui

1 stable release

1.0.1 Apr 23, 2025

#690 in GUI

Download history 240/week @ 2025-04-23 18/week @ 2025-04-30 28/week @ 2025-05-07

286 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–26MB
~367K SLoC