gitmyhub

egui

Rust ★ 30k updated 9d ago

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

An immediate-mode GUI library for Rust that runs on desktop and in web browsers via WebAssembly, letting you build interfaces by describing them each frame rather than managing a persistent UI tree.

RustWebAssemblywgpuOpenGLsetup: moderatecomplexity 3/5

egui (pronounced "e-gooey") is a library for building graphical user interfaces in the Rust programming language. It works using what is called "immediate mode" — instead of setting up a persistent tree of interface elements that react to events, you simply describe what you want to display on every frame, much like drawing to a canvas. This makes it straightforward to reason about: you call a function like "add a button here," and if the button is clicked, you handle it on the same line.

The library runs both natively on Windows, Mac, Linux, and Android, and in web browsers via WebAssembly (a technology that lets compiled Rust code run inside a browser). This means the same code can produce either a desktop app or a web app without changes. The companion framework eframe handles the platform-specific setup so you can focus on your interface code.

egui includes standard widgets like buttons, sliders, checkboxes, text fields, color pickers, images, collapsible panels, scrollable regions, and moveable windows. It supports anti-aliased rendering (smooth edges on shapes and text), accessibility tools, and multiline text editing with copy/paste.

It is particularly well-suited for game developers who want to add a debug or settings panel to a game engine, or for Rust developers who need a quick, self-contained interface for a tool or data viewer. It is not aimed at producing native-looking desktop software — its visual style is its own.

Where it fits