emilk /egui
egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
★ 32,184⑂ 2,356
32,184
stars
+228+256+1,329
2,356
forks
–
watchers
–
prs
–
issues
–
releases
–
discussions
README
🖌 egui: an easy-to-use GUI in pure Rust
👉 Click to run the web demo 👈
egui (pronounced "e-gooey") is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and in your favorite game engine.
egui aims to be the easiest-to-use Rust GUI library, and the simplest way to make a web app in Rust.
egui can be used anywhere you can draw textured triangles, which means you can easily integrate it into your game engine of choice.
eframe is the official egui framework, which supports writing apps for Web, Linux, Mac, Windows, and Android.
Example
rust
ui.heading("My egui Application");
ui.horizontal(|ui| {
ui.label("Your name: ");
ui.text_edit_singleline(&mut name);
});
ui.add(egui::Slider::new(&mut age, 0..=120).text("age"));
if ui.button("Increment").clicked() {
age += 1;
}
ui.label(format!("Hello '{name}', age {age}"));
ui.image(egui::include_image!("ferris.png"));
Sections:
Example
Quick start
Demo
Goals
State / features
Dependencies
Who is egui for?
Integrations
Why immediate mode
FAQ
Other
Credits
(中文 README / Chinese README)
Quick start
There are simple examples in the examples/ folder. If you want to write a web app, then go to and follow the instructions. The official docs are at . For inspiration and more examples, check out the egui web demo and follow the links in it to its source code.
If you want to integrate egui into an existing engine, go to the Integrations section.
If you have questions, use GitHub Discussions. There is also an egui discord server. If you want to contribute to egui, please read the Contributing Guidelines.
Demo
Click to run egui web demo (works in any browser with Wasm and WebGL support). Uses eframe.
To test the demo app locally, run cargo run --release -p egui_demo_app.
The native backend is egui-wgpu (using wgpu) and should work out-of-the-box on Mac and Windows, but on Linux you need to first run:
sudo apt-get install -y libclang-dev libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
On Fedora Rawhide you need to run:
dnf install clang clang-devel clang-tools-extra libxkbcommon-devel pkg-config openssl-devel libxcb-devel gtk3-devel atk fontconfig-devel
NOTE: This is just for the demo app - egui itself is completely platform agnostic!
Goals
The easiest to use GUI library
Responsive: target 60 Hz in debug build
Friendly: difficult to make mistakes, and shouldn't panic
Portable: the same code works on the web and as a native app
Easy to integrate into any environment
A simple 2D graphics API for custom painting (epaint).
Pure immediate mode: no callbacks
Extensible: easy to write your own widgets for egui
Modular: You should be able to use small parts of egui and combine them in new ways
Safe: there is no unsafe code in egui
Minimal dependencies
egui is not a framework. egui is a library you call into, not an environment you 相关报道 (3)
News & coverage (12)
Hacker NewsEgui: An easy-to-use immediate mode GUI▲ 366 · 141 comments · 2021-08-13Hacker NewsEgui 0.27 – easy-to-use immediate mode GUI for Rust▲ 200 · 85 comments · 2024-03-27Hacker NewsEgui commit: Implement accessibility APIs via AccessKit▲ 96 · 37 comments · 2022-12-05Hacker NewsEgui and Eframe 0.24 Released▲ 5 · 0 comments · 2023-11-23Hacker NewsEgui: An easy-to-use GUI in pure Rust▲ 3 · 0 comments · 2025-12-02Hacker News0.32.0 – Atoms, popups, and better SVG support▲ 3 · 0 comments · 2025-07-13Hacker NewsEgui 0.29.0 – Multipass, `UiBuilder`, & visual improvements▲ 3 · 0 comments · 2024-09-27note[GitHub Daily] Rust-based headless browser moli debuts, agent-desktop tops for 2 consecutive days with +3,792 — 2026-11-042026-11-03GIGAZINEWordCraft, an open-source document creation app aiming to replace Microsoft Word, is a native app written in Rust and is also being considered for use with AI agents.2026-10-15GIGAZINEFastpotify is a lightweight, native, and fast Spotify app compatible with Windows, Linux, and macOS, featuring local playback, library access, and Spotify Connect control functions.2026-09-02