egui is an immediate mode GUI library for Rust that runs on both web and native platforms.
egui solves the problem of building user interfaces in Rust across multiple targets by using an immediate mode architecture. Rather than maintaining retained state trees, the library redraws the interface each frame based on application logic, simplifying reasoning about UI behavior. The library is designed to be portable, running anywhere textured triangles can be drawn, which enables integration into game engines and custom rendering contexts. eframe, the official framework built on egui, provides batteries-included support for web, Linux, Mac, Windows, and Android applications.
egui suits developers who prioritize ease of use and cross-platform reach. It is particularly well-suited for game developers needing in-game UI, applications targeting web via WebAssembly, and projects requiring a single codebase across desktop and web. The library emphasizes simplicity and speed, making it accessible to developers new to GUI programming in Rust. Those building traditional desktop applications with complex retained-state requirements may find immediate mode less natural than retained mode alternatives, though egui's design aims to minimize this friction.
The project maintains an active community presence with a dedicated Discord server and GitHub Discussions for user support. Development follows a structured contribution process documented in contributing guidelines. The codebase enforces memory safety through a no-unsafe-code policy, which is verified and publicly declared.