Add a debug or settings panel to a game engine without leaving Rust.
Build a quick desktop tool with a UI that also runs in the browser unchanged.
Create a data viewer or visualization app that works on Windows, Mac, Linux, and Android from one codebase.
Prototype an interface rapidly without worrying about platform-specific UI frameworks.
Requires Rust toolchain installation and potentially wasm-pack for web targets.
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.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.