Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ratatui is neat but the way it's architected, you need to take on third party dependencies for each individual widget. And we're talking basic things like spinners, checkboxes, text areas, etc. -- there aren't too many widgets built into ratatui itself. I didn't like the idea of taking all that on so instead I went with something more handrolled.


That's pretty much how I would expect a UI framework to work. As long as each widget class only depends on the UI base classes the dependencies should be small and grow proportionally to the number of widgets types used by the app. This should also being much less version churn than a big central library including everything.


That's a good point! Some sort of widget framework is important for extensions. But I think my issue is that there are only a dozen included widgets, so very basic things are left to third parties. Most mature UI libraries would include all the basic things, and leave a widget interface for uncommon extensions, not rely on third parties for basic features.

With the path they've chosen, it may mean less version churn, but the other side is you've gotta wait for each widget author to upgrade their widgets when Ratatui upgrades. This can lead to a situation where some widgets upgrade, some don't, and you're left either on the lower version with unpatched issues, or the newer version missing widgets.

I much prefer the design of web-sys and js-sys, where all the features are included and gated behind feature flags.


>This can lead to a situation where some widgets upgrade, some don't, and you're left either on the lower version with unpatched issues, or the newer version missing widgets.

We're fixing that in Ratatui 0.30 by introducing a stable core crate.


Rust has a culture of using lots of dependencies in general. I'm not super happy about this. I'd prefer a few larger dependencies, but most of the time I don't have the time/energy/talent to rebuild (or even vendor) these dependency trees


I understand that and am usually comfortable with it, but as far as Rust goes this goes too far for me. I'm fine taking on lots of deps for a big feature like Ratatui. But taking on a new dep for each widget seemed excessive.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: