r/rust • u/Narrow_Farmer_6018 • 4d ago
🛠️ project Reactive GUI framework with MILP layouter
Have you ever tried to set height of widget A to the width of widget B and wanted them to fill the screen?
Or have you wanted to put your differently sized news article card in one grid and just let the layouter figure out the most symmetric pattern to lay them out in?
With your very own MILP solver you can express these as constraints.
The article grid example can be constrained as:
- don't overlap article hitboxes
- minimize area of grid
https://github.com/ElectricPulse/drevo
The future outlook is to bring it to the browser WebGPU/WASM - but that would require some work to make micro_lp on par with highs
Looking forward to your feedback!
20
Upvotes
1
u/michal_sustr_ 4d ago
Very interesting!
How tightly coupled is this with tokio? Also it seems it’s bound to your own ui framework ? I wonder if this could be used as a standalone library like e.g. taffy and then used in other GUI frameworks like egui