egelm
egelm is a small app framework for building native GUI applications
in Rust with egui. It adds a typed,
message-driven widget lifecycle, child-widget management, asynchronous tasks,
error routing, and reusable dialogs on top of egui.
Features
- Typed messages, outputs, and errors for each widget
Managed<T>child widgets with automatic message processing- A
#[derive(Widget)]macro that updates managed children - Background work through Tokio
- Window hide/show controls and customizable close behavior
- Root-level error handling with a built-in error dialog
- Reusable about dialog and emoji helpers
Installation
Add egelm and Tokio to your application:
[]
= "0.1.1"
= { = "1", = ["rt-multi-thread", "macros"] }
The default egelm features enable Ctrl-C handling, tracing, and emoji
support.
Quick start
use *;
async
Run the application with:
How it works
An egelm application is composed of widgets:
Widgetis the full lifecycle trait. Itsviewmethod renders UI, whileupdatehandles typed messages andtickperforms per-cycle work.LeafWidgetis a simpler rendering-only trait for components that do not need messages, outputs, or errors.RootWidgetrepresents the top-level application and can customize window closing, error presentation, and initialeguisetup.Context<W>lets a widget emit messages, send output to its parent, report errors, and spawn asynchronous tasks.Managed<W>owns a child widget together with its message queue and context.
Deriving Widget implements child ticking for all named Managed<T> fields:
This keeps child message routing automatic while preserving concrete, compile-time message types.
AI usage
AI tools are used only to help create documentation, including this README. No AI-assisted content is committed without first being read and reviewed by a human.
License
This project is available under the MIT License.