Current state of GUI development in Rust?

@sharazam
at least on os x, most of the examples flash red before drawing - the more complex the example, the longer it stays red.
when scaling a window the examples (the table example) would squash or stretch (thats what i meant by non-uniform scaling) and only redraw widgets with correct aspect ratios on mouse up. Stuff like that.

1 Like

flutter-rs might be another choice. But the UI code would be mainly written in Dart, while Rust can take the work that concerns performance, or invoking native libraries.

5 Likes

I like to write UI in plain C, currently on IUP Library. Yes i know, there is a rust binding, but this is not up to date and i like up to date libs. The same i tried with wxWidgets and c++ but...yes...its c++...so i will take plain c. Based on personal reasons i don't like web based ui.

I tried gtk but currently i am working on windows and was not able to build all the requirements by myself, but i like to build all by myself, too. :slight_smile:

Maybe someone did the same or can point some alternatives? I like small binaries with a low level memory footprint in process,

Cool. I wish it had OpenGL soon.

Hi All,

Just a quick update on skryn. I have been busy the last few months reworking the TextBox and Button and I'm pleased to tell you that they both now support RTL and LTR languages.

Further more, you can have a mixture of RTL and LTR text in a paragraph and the flow corrects the way it is displayed.


Same paragraph resized displaying the mixture of RTL and LTR correctly.

There are a lot more things to be done and a lot of tweaks need to be made, but it is getting to a place where I'd liek to use this myself in my own applications slowly.

If you end up trying this please let me know if you find any bugs or features that you'd like to see. It is also now published on crates.io.

11 Likes

Great Idea. Tk is probably the only comparable and compatible Library to the original NCSA Mosaic Canvas GUI Widget Sets that Netscape used and who WebView, Chrome, Safari among other Browsers use in a highly customized state to render GUI. Interestingly enough the reason being that Tk allows every widget with any number of attributes to be upgraded in the stack using Config Methods. What this means is if you Wish to develop a Browser it is probably the only GUI Tool kit besides Wx that can do so. Also Tk offers the ability to pre set and pre load after render JavaScript and that is what it's all about. The problem is that nobody studies it fully and it is a very advanced toolkit but many use it in a very limited state likewise. It can mimic Qt or Wx also.

1 Like

I'm writing a GUI framework based on the elm-architecture. I had successfully implemented it in for the web and realize it could be extended to use native widgets for the target OS. Targeting the TUI is also doable and even easier since TUI don't need diffing and patching since it is just drawn every time. However TUI libraries in rust projects lack support with mouse events.

4 Likes

Here is the progress of the reactivity in the UI.

A few more iterations, it will be ready for public release.

4 Likes

I need it yesterday please

However TUI libraries in rust projects lack support with mouse events.

cursive supports MouseEvent since 0.7.0.

And tui is just an immediate mode UI, so it doesn't include any input event handling at all! But all supported backends have mouse support...

4 Likes

I just opened the code of sauron-native.

I haven't got to the point to get an MVP.
This serves as a Work-in-Progress as I don't have much time to spent on it.
Alongside sauron-native is the performance improvement of sauron web framework.

I also created a fork of tui-rs project which is a streamline version stripping away the complex widgets and adding the ability for widgets to hold attributes and events.

Contributions are much more more welcomed.
There are still a lot TODO with the core architecture such as applying patches to gtk.

Much needed backend for the following platforms:

  • android/kotlin
  • ios/swiftui
  • macos/cocoa
  • windows/winapi
  • redox-os/orbtk
7 Likes

Short update about OrbTk

OrbTk could now be run also on web browsers and provides a preview renderer based on Pathfinder GitHub - servo/pathfinder: A fast, practical GPU rasterizer for fonts and vector graphics. Without pathfinder the dependency handling on windows is mess at the moment. But we are working on it.

At last we've integrated a read only list widget in OrbTk and currently we are working on a selection ListView widget.

And I'm happy to announce that support for Android and iOS will be landed to OrbTk soon.

If you want to start with OrbTk, you are curious or you want to now how to run an OrbTk application in the browser, please check the readme
Sign in Ā· GitLab and examples.

I will also publish a complex post about the current state of OrbTk on reddit soon.

12 Likes

Screenshot showing OrbTk on the browser and as native macOS application:

(Complete same UI code for both platforms (check Sign in Ā· GitLab)).

20 Likes

Small update about OrbTk: https://www.reddit.com/r/rust/comments/dd4z4l/introducing_orbtk_the_rust_uitoolkit_03/

5 Likes

Is this an announcement of 0.3 release or more of a roadmap?

It is an status update to 0.3. What we archived so far and what comes next. I hope we could release 0.3 on the end of 2019 or start of 2020.

3 Likes

OrbTk sneak peak

10 Likes

Latest status update of OrbTkt https://www.reddit.com/r/rust/comments/e725t9.

5 Likes

What would be the right place to discuss OrbTk design and implementation? There's a behavior I'd like to change (current: focus remaining on previously used textbox even though button was clicked since; new: each widget is focusable unless explicitly opted out) and if I get it to work (I'm Rust neophyte), I'd like to open PR so it may be merged upstream. But what I want may not be what you want :slight_smile: so it's probably best to discuss it first. Would a ticket over at GitHub work?

The focus management in OrbTk is very basic and need to be expanded. I think your suggestion goes to the right direction. Iā€˜m glade :slightly_smiling_face: if you create an pr. But if you first want to share your ideas you could discuss with us on the Redox chat (orbital channel) Community - Redox - Your Next(Gen) OS.