#immediate-mode #port #idiomatic #container #original #micro-ui

microui-redux

Idiomatic Rust MicroUI (immediate mode GUI) library port

2 unstable releases

new 0.2.1 Apr 17, 2024
0.2.0 Apr 17, 2024
0.1.0 Jan 2, 2024

#242 in GUI

Download history 2/week @ 2024-01-01 7/week @ 2024-02-19 10/week @ 2024-02-26 15/week @ 2024-04-01 219/week @ 2024-04-15

234 downloads per month

BSD-3-Clause

1MB
2.5K SLoC

Rxi's Microui Port to Idiomatic Rust

Crate

This a port of Rxi's MicroUI to Rust language. We tried to keep the usage pattern as close to the original as possible, but also as idiomatic to Rust as possible. In contrast with microui-rs, this version uses the standard library to give us more flexibity and switch to closures for all container related operations (Window, Panel, Columns, ...).

Originally, we used C2Rust to create the initial code and iterated > 60 times to make microui-rs. This builds on top of that by much more!

Demo

Clone and build the demo (SDL2 & glow) / Tested on linux:

$ cargo run --example demo-sdl2-glow-full

random

Roadmap

Version 1.0

  • Use std (Vec, parse, ...)
  • Containers contain clip stack and command list
  • Move begin_*, end_* functions to closures
  • Move to AtlasRenderer Trait
  • Remove/Refactor Pool
  • Change layout code
  • Treenode as tree
  • Manage windows lifetime & ownership outside of context (use root windows)
  • Manage containers lifetime & ownership outside of contaienrs
  • Software based textured rectangle clipping
  • Add Atlasser to the code
    • Runtime atlasser
      • Icon
      • Font (Hash Table)
    • Separate Atlas Builder from the Atlas
    • Builder feature
    • Save Atlas to rust
    • Atlas loader from const rust
  • Image widget
  • Png Atlas source
  • Pass-Through rendering command (for 3D viewports)
  • API/Examples loop/iterations
  • Documentation

Dependencies

~0.5–1.2MB
~23K SLoC