Cargo Features
[dependencies]
ratatui = { version = "0.27.0-alpha.5", default-features = false, features = ["crossterm", "termion", "termwiz", "serde", "macros", "all-widgets", "widget-calendar", "underline-color", "unstable", "unstable-rendered-line-info", "unstable-widget-ref", "document-features"] }
- default = crossterm, underline-color
-
The crate provides a set of optional features that can be enabled in your
cargo.toml
file.By default, we enable the crossterm backend as this is a reasonable choice for most applications as it is supported on Linux/Mac/Windows systems. We also enable the
underline-color
feature which allows you to set the underline color of text. - crossterm default
-
Generally an application will only use one backend, so you should only enable one of the following features: enables the
CrosstermBackend
backend and adds a dependency on the [Crossterm crate].Enables crossterm
- termion
-
enables the
TermionBackend
backend and adds a dependency on the [Termion crate].Enables termion
- termwiz
-
enables the
TermwizBackend
backend and adds a dependency on the [Termwiz crate].Enables termwiz
- serde
-
The following optional features are available for all backends:
enables serialization and deserialization of style and color types using the [Serde crate].
This is useful if you want to save themes to a file.Enables serde, serde of bitflags and compact_str
- macros
-
enables the
border!
macro. - all-widgets = widget-calendar
-
enables all widgets.
- widget-calendar all-widgets?
-
Widgets that add dependencies are gated behind feature flags to prevent unused transitive dependencies. The available features are: enables the
calendar
widget module and adds a dependency on the [Time crate].Enables time
Affects
widgets::calendar
… - underline-color default
-
Underline color is only supported by the
CrosstermBackend
backend, and is not supported on Windows 7. enables the backend code that sets the underline color.Enables crossterm
Affects
cell::Cell.underline_color
,style::Style.underline_color
… - unstable = unstable-rendered-line-info, unstable-widget-ref
-
The following features are unstable and may change in the future:
Enable all unstable features. - unstable-rendered-line-info unstable?
-
Enables the
Paragraph::line_count
Paragraph::line_width
methods which are experimental and may change in the future. See Issue 293 for more details. - unstable-widget-ref unstable?
-
Enables the
WidgetRef
andStatefulWidgetRef
traits which are experimental and may change in the future.
Features from optional dependencies
- document-features implicit feature
-
Enables document-features
document-features:
Extract documentation for the feature flags from comments in Cargo.toml