a41c97b413
These are less stable than the non-ref traits as we have not yet committed to the exact API. This change moves them to ratatui from ratatui-core. To facilitate this: - implementations of WidgetRef for all internal widgets are removed and replaced with implementations of Widget for references to those widgets. - Widget is now implemented for Option<W> where W: Widget, allowing for rendering of optional widgets. - The blanket implementation of Widget for WidgetRef is reversed, to be a blanket implementation of WidgetRef for all &W where W: Widget. BREAKING CHANGE: implementations of WidgetRef no longer have a blanket implementation of Widget, so Widgets should generally implement the Widget trait on a reference to the widget rather than implementing WidgetRef directly. This has the advantage of not requiring unstable features to be enabled. Part of: https://github.com/ratatui/ratatui/issues/1388 Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Ratatui Core
ratatui-core is the core library of the ratatui project, providing the essential building blocks for creating rich terminal user interfaces in Rust.
Why ratatui-core
?
The ratatui-core
crate is split from the main ratatui
crate
to offer better stability for widget library authors. Widget libraries should generally depend
on ratatui-core
, benefiting from a stable API and reducing the need for frequent updates.
Applications, on the other hand, should depend on the main ratatui
crate, which includes
built-in widgets and additional features.
Installation
Add ratatui-core
to your Cargo.toml
:
cargo add ratatui-core
Contributing
We welcome contributions from the community! Please see our CONTRIBUTING guide for more details on how to get involved.
License
This project is licensed under the MIT License. See the LICENSE file for details.