Migrate from tui-rs
Several options are available to migrate apps and libs:
- Fully replace
ratatuias a drop in replacement aliased as
- Support both
Fully replace Tui with Ratatui
Most new code should use the following. To take this approach to migration requires find and replace
ratatui:: on the entire codebase.
Drop in replacement
The simplest approach to migrating to
ratatui is to use it as drop in replacement for tui and
update the terminal libraries used (
Support both tui and ratatui
For more complex scenarios where a library (or in some cases an app) needs to support both ratatui and maintain existing support for tui, it may be feasible to use feature flags to select which library to use. See tui-logger for an example of this approach.