Repolode
emilk

emilk/egui

An easy-to-use immediate mode GUI library for Rust that runs on the web and natively, and can be embedded in game engines.

Stars
31,659
Forks
2,228
Open issues
1,068
Last commit
12 hours ago

What is it?

egui is an immediate mode GUI library written in pure Rust. Instead of building a retained tree of widgets with callbacks, you call UI functions every frame, such as ui.button("Save").clicked(), and act on the result directly. This keeps application GUI code simple and avoids state that drifts out of sync with the display.

The library itself does not handle windowing, input collection or rendering. It only produces a triangle mesh each frame, and an integration layer draws it. The official eframe framework provides that layer for writing apps that target Web, Linux, Mac, Windows and Android, and egui can also be embedded in other engines through community integrations.

The project ships widgets such as labels, sliders, checkboxes, color pickers and text editors, along with layouts, resizable windows, scroll areas, images and accessibility support via AccessKit. The README notes that the API is still changing and new releases can include breaking changes.

Key features

  • 01Immediate mode API: UI is written as plain function calls executed each frame
  • 02Runs on the web via WebAssembly and natively on Linux, Mac, Windows and Android through eframe
  • 03Built-in widgets including sliders, text editing, color pickers and collapsing sections
  • 04Flexible layouts with horizontal, vertical, column and wrapping arrangements
  • 05Accessibility support through AccessKit on Windows and macOS
  • 06Integrates with game engines by rendering the triangle mesh it outputs

Use cases

  • Building a cross-platform desktop tool in Rust with one codebase
  • Adding debug or tuning panels to a game engine or simulation
  • Creating a simple web app in Rust compiled to WebAssembly
  • Prototyping interactive data visualization tools quickly

Quick start

  1. 1

    Run the egui demo app locally

    cargo run --release -p egui_demo_app
  2. 2

    Read the official docs and examples for writing your own app

Things to know

  • The API is still in flux and new releases include breaking changes.
  • On Linux the demo app needs several system packages installed first.
  • It is not a native-looking GUI and is aimed at Rust developers only.

Topics

FAQ

What is egui?
An easy-to-use immediate mode GUI library for Rust that runs on the web and natively, and can be embedded in game engines. egui is an immediate mode GUI library written in pure Rust. Instead of building a retained tree of widgets with callbacks, you call UI functions every frame, such as ui.button("Save").clicked(), and act on the result directly. This keeps application GUI code simple and avoids state that drifts out of sync with the display.
Is egui free to use? What license does it have?
egui is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is egui still maintained?
Actively maintained. The last commit to egui was on Oct 21, 2026.
What can I use egui for?
Building a cross-platform desktop tool in Rust with one codebase Adding debug or tuning panels to a game engine or simulation Creating a simple web app in Rust compiled to WebAssembly Prototyping interactive data visualization tools quickly
How do I install egui?
Run the egui demo app locally: cargo run --release -p egui_demo_app Read the official docs and examples for writing your own app
Where can I get egui?
The source code and installation instructions are on GitHub: https://github.com/emilk/egui

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects