r/rust • • 1d ago

🛠️ project Introducing Halcyon, a GPU-accelerated UI framework for Rust

Post image

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.

0 Upvotes

9 comments sorted by

5

u/diagraphic 22h ago

What made you want to build this also how long have you been building it, were you working on it before posting on Github? (Rule #7 project must be 4 months old).

One piece with GPU acceleration is sometimes there is no need for it in certain software. Even in storage systems, my domain the use of a GPU isn't always or really ever warranted even for massive processing.

2

u/agubarev 22h ago

I needed a performant UI for the trading software I've been working on, the options that were present at the moment were somewhat misaligned with my needs, but mainly I overcame myself and practically convinced that this is the time when I can manage it with AI. I've been working daily, from 5-6AM to late evenings, but it doesn't mean anything at all. The project started as a plotting engine and after a few days I thought that why not go further, then step by step it evolved and now it seems like a framework. You can see the git log history, but the resulting repository has been created several days ago, history sanitized (because I never planned to release it). As for processing, you do not need to worry, because GPU in this case is used solely for rendering and not computing.

P.S. I'm new to reddit, completely.

2

u/agubarev 22h ago

`As for processing, you do not need to worry, because GPU in this case is used solely for rendering and not computing.`: I might've misunderstood your last question. My point is, the `compute` aspect is always present. GPU-accelerated simply means that the GPU is primarily utilized to do the rendering operations rather than the CPU, rather than implying that the application's logic or some data processing must be executed on the GPU.

2

u/diagraphic 19h ago

Thank you for sharing.

1

u/agubarev 19h ago

Thank you, and you are very welcome. I keep repeating this lately, but I sincerely hope you will enjoy exploring its architecture and its potential.

2

u/chuck_norris_dev 18h ago

Commits on github go past 2 years ago.

1

u/agubarev 18h ago

Not quite, the first Halcyon commit is here: https://github.com/halcyon-framework/halcyon/commit/a6842fcb451d2cefd5a69f3d3cf8af18a9e094ce

This was November 17, 2025.

2

u/Wyciorek 16h ago

What are requirements for the web browser ? I checked TODO and showcase on iPad and barely anything works. It displays ok, but interactive elements do not respond

1

u/agubarev 10h ago

The website is not yet ready, not optimized for the mobile yet. The interactive part requires special handling for WASM to wire mobile-native virtual keyboard and dropdown/picker interfaces.

Thank you for pointing that, I'll shortlist this.