Cargo Features
[dependencies]
ratatui = { version = "0.29.1-alpha.0", default-features = false, features = ["crossterm", "termion", "termwiz", "serde", "macros", "palette", "scrolling-regions", "all-widgets", "widget-calendar", "underline-color", "unstable", "unstable-rendered-line-info", "unstable-widget-ref", "unstable-backend-writer", "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 oncrossterm
.Enables crossterm
- termion
-
enables the
TermionBackend
backend and adds a dependency ontermion
.Enables termion
- termwiz
-
enables the
TermwizBackend
backend and adds a dependency ontermwiz
.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. - palette
-
enables conversions from colors in the
palette
crate toColor
.Enables palette
- scrolling-regions
-
Use terminal scrolling regions to make some operations less prone to flickering. (i.e. Terminal::insert_before).
Affects
backend::Backend.scroll_region_up
,backend::Backend.scroll_region_down
… - 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 ontime
.Enables time
- underline-color default
-
The following optional features are only available for some backends:
enables the backend code that sets the underline color. Underline color is only supported by the
CrosstermBackend
backend, and is not supported on Windows 7.Enables crossterm
Affects
cell::Cell.underline_color
,style::Style.underline_color
… - unstable = unstable-backend-writer, 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. - unstable-backend-writer unstable?
-
Enables getting access to backends' writers.
Features from optional dependencies
- document-features implicit feature
-
Enables document-features
document-features:
Extract documentation for the feature flags from comments in Cargo.toml