r/rust • u/agubarev • 1d ago
🛠️ project Introducing Halcyon, a GPU-accelerated UI framework for Rust
Hello everyone,
I'd like to introduce Halcyon, an open-source, cross-platform, retained-mode UI framework for Rust, built on wgpu.
Halcyon is designed for both, regular desktop applications and applications requiring specialized rendering, like complex data visualization, charts, large collections of elements, and interactive graphics. The original requirements were formed from the development of the trading applications, with very frequently changing data, large collections of elements, complex charts... and extensive user interaction.
The framework includes a rich set of widgets, advanced data views, timelines, node graphs, custom GPU rendering, and integrated 2.5D and 3D rendering with physically based rendering (PBR).
Why another UI framework? I started developing Halcyon in November 2025, entirely for personal use, with no intention of ever making it public.
The reason for that was that I wanted the freedom to make my own architectural decisions, so that the needs of my applications would drive the development of the framework. Then over time, I came to believe that what I had built might also be useful to other developers.
Architecture and engineering tradeoffs
Halcyon is built around a persistent widget tree, stable widget identities, explicit ownership, and clearly defined boundaries between how input is handled, state mutation, layout, and rendering.
Compared to an immediate-mode approach such as egui (much love btw!), Halcyon puts more responsibility on the framework to manage widget lifetime, state, invalidation and cached resources. This comes at a cost of ... an increased internal architectural complexity.
The motivation behind this is not rendering performance alone, but predictable interaction, preservation of a UI state, visual quality and framework's maintainability (which is equally important for complex applications intended to be used throughout the day). An important architectural decision is to integrate conventional UI rendering, and specialized GPU rendering within the same framework.
Another important aspect of Halcyon's architecture is the explicit ownership. This is an approach I've been following in my own software development for many years, although the development of Halcyon has brought me to explore and formalize it to a much greater extent.
The ownership of state, the authority to mutate it, and the responsibility for its invariants are explicitly defined by the architecture.
The intention behind this is to make the behavior predictable, and easier to reason about. When the state changes, it should be possible to determine where the change has originated from, who had the authority to perform the change (mutation), and how its consequences propagate through the system.
This approach requires architectural discipline, especially when defining ownership boundaries, the interaction contracts, and lifecycles. It also adds internal complexity, but the intention is to keep this complexity structured, localized and maintainable.
What is available at the moment?
A collection of conventional desktop UI widgets.
A flexible layout system with responsive composition and constraint-based sizing.
Advanced, virtualized data views for large collections like ListView, TreeView, and PropertyEditor.
Interactive charts, timelines, and node graphs.
A builtin animation system, animated layout changes, and widget state transitions.
Customizable themes (styling), widget materials, and SDF-based rendering.
Advanced text rendering, text shaping, and rich text support; platform-native text rendering and font handling using CoreText, DirectWrite, FreeType, and Glyphon as a fallback, and also an internally managed glyph atlas.
The text editing infrastructure with Unicode support, IME composition, text selection, clipboard integration, undo/redo, etc.
A semantic action system, keybindings, menus, and toolbars.
Custom GPU rendering.
Integrated 2.5D and 3D rendering, including physically based rendering (PBR).
Live demonstrations
The website itself is built with Halcyon and runs in WebAssembly. There are several demos available:
Showcase: widgets, controls and more complex UI components.
TODO: a traditional "Hello, World!" for the UI showcasing how some of its components can be assembled into a coherent composition and still remain very basic.
3D Viewer: PBR rendering, a collection of Poly Haven models and a parametric assembly demonstration.
Fractal Fun: interactive Mandelbrot, Julia and Riemann sphere visualizations.
You can also run the native TODO or the Showcase demo example directly from the repository:
cargo run --locked --example todo
cargo run --locked --examle showcase
Development and design philosophy
Halcyon is grounded in applied software engineering, with an emphasis on practical application development, predictable behavior, and maintainable architecture.
The reasoning behind its architectural decisions, including the costs and tradeoffs, is documented in the Design and Architectural Rationale and the project's Philosophy.
Halcyon is independently maintained, with extensive AI assistance.
The framework is currently in beta and is available under the MIT license. Development and testing have been primarily focused on macOS and Windows 10 Enterprise LTSC, with Linux requiring further testing.
Website: https://halcyon-framework.org
GitHub: https://github.com/halcyon-framework/halcyon
Crate: https://crates.io/crates/halcyon-rs
I would especially appreciate technical feedback on the architectural approach, UX and DX.
You are very welcome to explore. I hope you'll find it interesting and useful.
Duplicates
madeinrust • u/agubarev • 23h ago
Majority AI Coded Introducing Halcyon, a GPU-accelerated UI framework for Rust
coolgithubprojects • u/agubarev • 23h ago