Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

MasterKPG/rust-glass

Developer Tools

Rust immediate-mode GUI framework that GPU-renders Liquid Glass widgets with refraction, blur and spring animation.

109
11
Rust
Apache-2.0
1 day old

What it does

rust-glass is an immediate-mode GUI framework for Rust that draws widgets with a Liquid Glass look on the GPU. Glass elements refract, blur and tint whatever sits behind them, including other glass elements, and shapes can merge and split like liquid drops. Motion is spring-based and frame-rate independent, so animations can be interrupted at any point.

The framework ships a broad widget set (buttons, sliders, text fields, menus, tab bars, tables, modals, toasts and more), keyboard focus, and screen reader support through AccessKit. It also covers scroll areas, drag and drop, reorderable lists, and two-axis scrolling with virtualized row layout. The renderer only redraws when something changes, so an idle window costs no CPU.

It is aimed at Rust developers who want a polished, animated desktop UI and are willing to build on an early-stage, self-contained framework rather than an existing toolkit.

Quick start

You need Rust 1.90 or newer and a GPU supporting Vulkan, DirectX 12 or Metal. Add the crate:

cargo add rust-glass

The README example shows the minimal app shape: implement the App trait with an update method, draw a background gradient first because glass needs something behind it to bend, then place a Panel containing widgets such as a slider, a toggle and a prominent button. run(Options::default(), app) opens the window. See the full example.

To explore every widget group and edit the glass material live, clone the repository and run the showcase:

git clone https://github.com/MasterKPG/rust-glass
cd rust-glass
cargo run --release -p showcase

Dropping an image on the showcase window sets it as the wallpaper. The guide covers layout, widgets, dialogs, theming, materials, custom widgets, animation and testing; the API reference is on docs.rs.

How the glass renders

The scene is first drawn into a texture; the area behind glass is copied and downscaled into a blur chain. A shader computes the distance to each glass outline and samples the backdrop along a rounded bevel, with red bending more than blue to produce dispersion. Rim light, edge, glow and shadow reuse the same distance field. Non-overlapping draws share a pass; a page with 28 glass elements needs 3 passes.

The author notes that egui was the first base candidate, but its single-pass painting means a widget cannot sample widgets below it, so rust-glass became its own framework. An egui-glass renderer is planned on the roadmap.

Constraints

The project is early-stage and the author states contributions are not open. Windows is hand-tested on Vulkan and DirectX 12; macOS (Metal) and Linux (Vulkan) run tests and page renders in CI, with text using each platform's own font. Screen reader support has only been tested with Windows UI Automation; VoiceOver and Orca have not been tried. The API surface may still change as the roadmap is executed.

rust-glass is independent and not affiliated with Apple; it contains no Apple code, fonts, icons or images. It is licensed under MIT or Apache-2.0, at your option.

HotRepo's take

The repository entered HotRepo's new-project board on 2026-11-26 with 106 stars and 4 stars gained in the observed one-hour window on the Rust list, but it has no recorded best GitHub daily rank. That is a very short window on a young project, so the numbers describe early attention rather than sustained traction. The technical case is more concrete: a self-built renderer that solves the multi-pass problem egui cannot, measured at 0.2–0.4 ms of UI code and 3–6 ms GPU time per frame on Intel UHD hardware at 1770×1170. Developers evaluating it should weigh that early-stage status, the closed contribution model and unverified VoiceOver/Orca paths alongside the rendering work.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. deeplethe/solid-glassA shadcn/ui design system with a glass material aimed at chat and agent interfaces.TypeScript2,197
  2. meshy-dev/ThreeRTA hardware ray-traced real-time path tracer wrapped in a three.js-style scene API for building rendered games and scenes.TypeScript114
  3. emilk/eguiA GUI library for Rust developers who need any interface at all, especially inside games and tools.Rust31,719
  4. react/reactA JavaScript UI library for building component-based web and native interfaces, used by frontend teams choosing a rendering stack.JavaScript251,745
  5. sveltejs/svelteA compiler for declarative web components that outputs small JavaScript for targeted DOM updates.JavaScript88,514