9 Commits

Author SHA1 Message Date
Jagoda Estera Ślązak
007713e50a
feat(no_std)!: replace Backend's io::Error usages with associated Error type (#1778)
Resolves #1775 

BREAKING CHANGE: Custom backends now have to implement `Backend::Error`
and `Backend::clear_region`. Additionally some generic `Backend` usage
will have to explicitly set trait bounds for `Backend::Error`.
2025-04-23 15:05:59 -07:00
Tyler Breisacher
d88cd29079
chore: Add 'const' to functions where possible. (#1802)
The Clippy check for this (missing_const_for_fn) is already enabled, but
catches more cases in upcoming toolchain versions.

This is part of the work to unblock #1727
2025-04-20 18:48:49 -07:00
Josh McKinney
bb068892c9
chore: fix io_other_error clippy lints (#1756)
Pre-emptive fix for new lint to be added in 1.87 (currently in beta).

https://rust-lang.github.io/rust-clippy/master/index.html\#io_other_error
2025-04-15 11:09:05 -07:00
Josh McKinney
2739391950
style: use Module imports_granularity (#1728)
I was swayed by the arguments about this made by the compiler team In
<https://github.com/rust-lang/compiler-team/issues/750> and decided to
look at how this organization affects ratatui. I found this reduces the
number of lines across the codebase by about 350 and makes the imports
more readable and definitely more greppable as you usually only have
to read a single line. I've found in the past that maintaining imports
regularly leads to merge conflicts which have to be resolved by hand
and this change should reduce the likelihood of that happening.

Main change is in rustfmt.toml, and the rest is just the result of
running `cargo xtask format`.

While implementing this, cargo machete brings up that the various
backend crates are unused by the example crates.

The re-export of each backend crate under ratatui is to make it possible
for libs that rely on a specific version of ratatui to use the same
version of the backend crate. Apps in general should use the backend
crate directly rather than through ratatui as this is less confusing.

- Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the
  examples.
- Adds the backend crate to the dependencies of the examples that use
  the backend crate directly.
2025-03-19 16:48:02 -07:00
github-actions[bot]
c10d0f12e8
chore: release (#1671)
## 🤖 New release

* `ratatui-core`: 0.1.0-alpha.2 -> 0.1.0-alpha.3
* `ratatui-crossterm`: 0.1.0-alpha.1 -> 0.1.0-alpha.2
* `ratatui-widgets`: 0.3.0-alpha.1 -> 0.3.0-alpha.2
* `ratatui-macros`: 0.7.0-alpha.0 -> 0.7.0-alpha.1
* `ratatui-termwiz`: 0.1.0-alpha.1 -> 0.1.0-alpha.2
* `ratatui-termion`: 0.1.0-alpha.1 -> 0.1.0-alpha.2
* `ratatui`: 0.30.0-alpha.1 -> 0.30.0-alpha.2
2025-03-01 15:34:53 -08:00
Josh McKinney
e7831aedd4
chore: release 0.30.0-alpha.1 (#1618)
Versions:

```
ratatui = { path = "ratatui", version = "0.30.0-alpha.1" }
ratatui-core = { path = "ratatui-core", version = "0.1.0-alpha.2" }
ratatui-crossterm = { path = "ratatui-crossterm", version = "0.1.0-alpha.1" }
ratatui-termion = { path = "ratatui-termion", version = "0.1.0-alpha.1" }
ratatui-termwiz = { path = "ratatui-termwiz", version = "0.1.0-alpha.1" }
ratatui-widgets = { path = "ratatui-widgets", version = "0.3.0-alpha.1" }
```
2025-01-15 15:31:38 -08:00
Josh McKinney
d3f01ebf6e
chore(lint): ensure lint config is correct (#1528)
- Move lints to workspace manifest
- Add lint config to backend crates
- Fix one small lint error
2024-11-30 11:13:50 +03:00
Josh McKinney
fbf6050c86
chore: prepare alpha modularization release (#1525)
This is the first modularization -alpha release. It captures the changes
necessary to manual publish. And ensures all the crates are properly
setup and to set a baseline for comparison in future release checks etc.

This does not update / check the git-cliff setup / changelog

Part of: #1388
2024-11-28 16:47:43 -08:00
Orhun Parmaksız
217c57cd60
refactor: modularize backends (#1508)
Backend code is now moved to `ratatui-crossterm`, `ratatui-termion` and
`ratatui-termwiz`. This should be backwards compatible with existing code.

Co-authored-by: Josh McKinney <joshka@users.noreply.github.com>
2024-11-23 15:23:40 -08:00