chore: expose crossterm 0.28/0.29 feature flags in Ratatui (#2270)

In docs we currently say that individual versions of crossterm could be
enabled like this:

```toml
ratatui = { version = "0.30.0-beta", features = ["crossterm_0_28"] }
```

However this wasn't actually possible:

```
package `x` depends on `ratatui` with feature `crossterm_0_28` but `ratatui` does not have that feature.

failed to select a version for `ratatui` which could resolve this conflict
```

This PR fixes that by exposing respective feature flags.
(Tested locally)

---------

Co-authored-by: Jagoda Estera Ślązak <128227338+j-g00da@users.noreply.github.com>
This commit is contained in:
Orhun Parmaksız
2025-12-16 11:23:50 +03:00
committed by GitHub
parent 38f7ee2049
commit b7ecef086d

View File

@@ -32,6 +32,10 @@ default = ["crossterm", "underline-color", "all-widgets", "macros", "layout-cach
#! Generally an application will only use one backend, so you should only enable one of the following features:
## enables the [`CrosstermBackend`](backend::CrosstermBackend) backend and adds a dependency on [`crossterm`].
crossterm = ["std", "dep:ratatui-crossterm"]
## selects the crossterm 0.28.x backend implementation
crossterm_0_28 = ["crossterm", "ratatui-crossterm/crossterm_0_28"]
## selects the crossterm 0.29.x backend implementation (default)
crossterm_0_29 = ["crossterm", "ratatui-crossterm/crossterm_0_29"]
## enables the [`TermionBackend`](backend::TermionBackend) backend and adds a dependency on [`termion`].
termion = ["std", "dep:ratatui-termion"]
## enables the [`TermwizBackend`](backend::TermwizBackend) backend and adds a dependency on [`termwiz`].