Immediate-mode GUI framework in Rust

About uing


uing is my own immediate-mode GUI framework written in Rust.

It takes inspiration from Ryan Fleury's UI series, Figma and osu!framework for different aspects.

uing playground

I've always been unable to start making desktop applications because I was never satisfied with any of the existing technologies, frameworks and libraries that exist out there. So I end up making my own thing instead. It's going to be the basis for all my future desktop app projects, for example I want to make a music player with a very customizable audio spectrum.

Features

  • Render rounded rectangles
  • Render text
  • Render images
  • Declarative widget sizes (fixed, hug, fill)
  • Declarative layouts
    • stacked (= widgets overlayed on top of each other)
    • flex (a simplified version of it)
      • flex-wrap
  • Scrolling (both horizontal and vertical)
  • Mouse interactions (hover, press, click)
  • Text input
  • Text selection
  • Widget inspector
    • Inspect widget properties
    • Basic profiling information
    • See uploaded textures
  • State store system
  • Animations
  • Idle optimizations

Planned features

  • Grid layout
  • Use Metal (or maybe Core Animation) on MacOS (The OpenGL renderer is very slow on MacOS)
  • Handmade text layouting
  • Multiline text editing (will do handmade text layouting first)
  • Damage region optimizations (maybe)
  • Widget creation and deletion animations Reported to idk when (I have no idea what API that should have...)

Dependencies

uing uses frienderer (my own very simple OpenGL renderer) for all the rendering.

While I aim for this framework to have little-to-no third-party crates, unfortunately right now the dependency tree is still very bloated, mainly by parley and swash which are the crates I use to do text layouting and glyph rendering. I plan to eventually do text layouting myself, and will probably use native libraries for glyph rendering (FreeType on Linux, DirectWrite on Windows, CoreText on MacOS). Honestly reading Text Rendering Hates You made me want to do it more lol.

I also use tracing for logging, arguably overkill, so I might also replace it eventually. And finally I use image for image parsing, which imports quite a lot. I'm not sure if I'll ever replace that, but if I do then ideally it would be with another Rust crate.

Read more
Filters

Recent Activity

Implemented text selection!

And at the end I show you can Ctrl+A.
Things left would be bidirectional selection rects, clipboard, and... multiline text editing.
I gave up on multiline because I just can't do it with parley. Probably a skill issue or I missed something. So that's gonna wait til I make text layouting myself.
And I'm gonna do clipboard before the bidirectional selection rects because I need to paste some arabic.