Is there any chance we are getting any built in gui lib in rust , any time soon?

I admit rust is a great language, but it still lacks its own graphics library and crates out there or wrappers around opengl and are not easy to implement, i wanted to ask that are there in plans for make separate graphics library , or we have to use existing crates and if there is no choice, does anybody know how to use Vulkan SDK with rust

2 Likes

I think gfx-rs sounds like it could be of use. If you want to build a GUI using widgets and such, then the automatically generated Gtk bindings might be more fitting.

Built-in as in being included in the std, probably never. Bindings to existing GUI toolkits should improve in the following years. AFAIK GTK, QT and imgui bindings are usable, but not really convenient to use or idiomatic enough. There is attempts like relm to built more friendlier abstractions, but they are still WIP.

If you target only Vulkan I would recommend to use vulkano, but note that it's just a low-level API, so you will not get things like text rendering out of the box. (but I think there was an experimental crate for that)

I would certainly love to see pure-Rust GUI framework designed from the ground up, but building nativish cross-platform solution is an overwhelming amount of work. So I have higher hopes for crates which will target specific platforms, like native-windows-gui. (well, gtk-rs also can be considered a native GUI crate for Gnome)

3 Likes

can we request for direct vulkan/opengl integration in rust so that we dont have to use them via unsafe rust

Using crates which wrap unsafe code in a safe interface (as e.g. vulkano and glium do) is a perfectly idiomatic Rust and it's intended usage of unsafe functionality. There is no good reasons for inclusion of this stuff into the std (it's the only interpretation for "integration" which I have). Even languages which adapt " batteries included" approach do not have such integration.

8 Likes

This Is the most promising gui framework written in Rust i can think of https://github.com/maps4print/azul

1 Like