Migrate from tui-rs
Ratatui is a fork of tui-rs, created to continue maintenance of the project.
Several options are available to migrate apps and libs:
- Fully replace
tui-rs
withratatui
(preferred approach) - Use
ratatui
as a drop in replacement aliased astui
- Support both
tui
andratatui
Fully replace Tui with Ratatui
Most new code should use the following. To take this approach to migration requires find and
replace tui::
->ratatui::
on the entire codebase.
ratatui = { version = "0.24.0" }
crossterm = { version = "0.27.0" }
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 (crossterm
/ termion
). E.g.:
tui = { package = "ratatui", version = "0.24.0", features = ["crossterm"] }
crossterm = { version = "0.27.0" }
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.
Backwards compatibility and breaking changes
- BREAKING-CHANGES.md
- PRs tagged with the breaking changes label