1 comment

[ 3.2 ms ] story [ 11.6 ms ] thread
Some of you might remember that in the "Ask HN: Do you have a problem you'd pay to have taken away?" discussion, I asked for a Cross-platform statically typed 2D&GUI framework.

I finally found a pretty good candidate in the form of the egui rust crate.

1. It's Rust, so statically typed and there's great tool support. I personally would have preferred C/C++ for ease of interop, but Rust is still way better than JavaScript, both for tools and for embedding.

2. It's built like immediate mode GUI but with a few convenience helpers, so it is in style quite similar to React in the sense that nested UI elements are just function calls with child parameters.

3. It uses OpenGL or WebGL, meaning the rendering is done purely in the GPU. Fonts are pre-rendered into a texture atlas and then that is used while aligning to display pixels to keep the text crsip.

4. It re-renders only when things change, i.e. when you move the mouse or type. But it still has convenient little helpers for animations.

I also said "suitable for games, paid upfront and not phoning home" and this one is actually built by someone with experience building games and game engines ... and I'd say it shows. The whole thing just feels so much more interactive than pretty much any JS framework I've used recently.

And it's open source.