Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Future of tui-rs #654

@fdehau

Description

@fdehau

Hi !

Some of you may have noticed that my activity as the maintainer of tui has significantly decreased over the past year. There are multiple reasons to that: my job is taking most of my creative coding energy (for good reasons), I don't use Rust enough (even though I miss it) and I have not used tui for personal/work projects in a while so my motivation to dedicate time to it is pretty low. None of that is likely going to change in a near future. At the same time, the popularity of the crate keeps growing and I keep seeing it used in very cool projects. So it would be a shame if all of that goes to waste.

Therefore, I want to try over the coming months to foster a welcoming community around this project and make myself more available so that one or multiple maintainers could slowly take over the development of this crate. The main issue is that I do not have a lot of experience doing so. tui is my first and only popular project and I have not been really active in any other open source projects so far. My main question for those who would be interested in getting more involved but also for current users of the crate would thus be: what would encourage you to start contributing ? What I have in mind so far is:

  • an official communication medium to discuss topics or getting help (Github Discussions, Zulip, Discord). The idea would be to have a place for less structured discussion and keep Github Issues for real issues and more formal communication.
  • a dedicated Github organisation
  • a better "Contributing" guide so that everybody would feel empowered to contribute.
  • a "Code of Conduct"

I'm obviously all ears for more or better ideas.

I think it would also be fair to share my current view of the status of this crate:

I think tui got popular for the following reasons:

  • A "nice look and feel" by default: I'm convinced tui draw attention because it has a nice demo shown in the README that you can replicate pretty easily.
  • Nice for quick prototyping:
    • it is easy to add tui to your project to draw quickly on your terminal. Having a UI does not even have to be the end goal: I used it in several occasions to have a better understanding of the internal state of my program. Sometimes a nice graph is way better than hundreds of logs.
    • tui does not make any assumptions about how you want to drive your app: you don't have an app.run() method taking over your program execution and forcing you to drive everything from the UI.
  • Nice for Rust beginners: because of the immediate mode paradigm we avoid a lot of lifetime and ownership issues common to retained mode UIs in Rust.

tui was good enough for my own use cases. But then people started using it in more ambitious projects and it started to show some shortcomings:

  • The immediate mode paradigm is not clear to everyone. I keep getting a lot of requests to make it possible to store or return Widget even though Widget are simply configurable draw commands.
  • It is hard to build complex UI abstractions on top of tui: scroll, mouse support and advanced layouts are for example challenging in the current state of the crate.
  • Only suitable for full screen apps.

I thus think that tui most promising changes would be:

  • A new architecture enabling the missing UI features. I don't think a common retained mode approach would be a good strategy though. At this point, a better investment of everyone's time would be to port the "look and feel" of tui to a crate like Cursive and officially deprecate tui. A more promising option would be something closer to what is described here.
  • Support for inline views which would make tui widgets available in CLI tools.

You obviously don't have to agree with any of that 😅.

So if the perspective of helping to maintain a fairly popular rust crate sounds like an interesting challenge to you, please reach out on this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions