emilk /egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

★ 32,301⑂ 2,385👁 146⑃ 3,447● 2,692▤ 46
RustApache-2.0Created 2019-01-13www.egui.rs/
下载:0.37.0 - Colored emojis! 🚀0.37.0 ↓0.37.02026-10-15
+19
日增长
+345
周增长
+991
月增长
32,301
stars
2,385
forks
146
watchers
3,447
prs
2,692
issues
46
releases

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 

Top issues

Discussions

Latest release

0.37.0 - Colored emojis! 🚀 0.37.0 2026-10-15
egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: 

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.
	
 Highlights ✨

 Emoji and glyph support
egui can now render _any_ glyph that is supported on your system, including colored emojis and non-Latin scripts.

To enable this, the integration has to use one of two APIs:

 Context::add_glyph_rasterizer(GlyphRasterizer): a GlyphRasterizer renders a single glyph. eframe uses this on web to render individual glyphs to an off-screen

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON