"Rats don't just survive; they discover; they create. ... I mean, just look at what they do with
the terminal!" – Remy & Orhun
We are excited to announce the biggest release of ratatui so far - a Rust library that's all about cooking up TUIs 👨🍳🐀
📢 Please note that this is a beta release, and we encourage you to try it out and provide feedback!
✨ WIP Release highlights: https://ratatui-0-30.ratatui.pages.dev/highlights/v030/
⚠️ List of breaking changes can be found here.
Features
-
56d5e05 (bar) Update label and text_value to accept Into<> by @Emivvvvv in #1471 [breaking]
BREAKING CHANGE:label and text_value now accept
Into<>types, which
breaks type inference.- Bar::default().label("foo".into()); + Bar::default().label("foo");
- Bar::default().text_value("bar".into()); + Bar::default().text_value("bar");
-
b76ad3b (bar) Impl Styled for Bar by @Emivvvvv in #1476
Related:#683
-
e15fefa (barchar) Add BarChart::grouped constructor by @joshka in #1513
Add a new constructor to the
BarChartwidget that allows creating a
grouped barchart with multiple groups of bars.Also add a new constructor to the
BarGroupwidget that allows creating
a group of bars with a label. -
369b18e (barchart) Reduce barchart creation verbosity by @Emivvvvv in #1453
Adds constructor methods for BarChart, BarGroup, and Bar
-
2d713d7 (crossterm) Allow multiple crossterm versions by @joshka in #1841
This commit introduces feature flags to make it possible for widget
library authors to depend on a specific version of crossterm without
causing version conflicts. This should make it easier for libraries and
apps to update crossterm versions more easily.The available feature flags are
crossterm_0_28andcrossterm_0_29.
By default, the latest version is enabled. If a multiple features are
enabled we choose the latest version. We will in general support at
least the last two major (0.x) versions of crossterm, and will only
remove versions in a major version bump. -
d99984f (layout) Add
Flex::SpaceEvenlyby @kdheepak in #1952 [breaking]Resolves #1951
BREAKING CHANGE:Old
Flex::SpaceAroundbehavior is available by usingFlex::SpaceEvenlyand newFlex::SpaceAroundnow distributes space evenly around each element
except the middle spacers
are twice the size of first and last elementsWith this change, the following variants of
Flexare supported:Flex::Start: Aligns items to the start; excess space appears at the
end.Flex::End: Aligns items to the end; excess space appears at the
start.Flex::Center: Centers items with equal space on both sides.Flex::SpaceAround(new): Distributes space around items; space
between items is twice the edge spacing.Flex::SpaceBetween: Distributes space evenly between items except
no space at the edges.Flex::SpaceEvenly(previouslyFlex::SpaceAround): Distributes
space evenly between items and edges.Flex::Legacy: Preserves legacy behavior, placing all excess space at
the end.
This aligns behavior of
Flexwith CSS flexbox more closely.The following is a screenshot in action:
<img width="1090" alt="image"
src="https://github.com/user-attachments/assets/2c7cd797-27bd-4242-a824-4565d369227b"
/>
-
9275d34 (layout) Add Offset::new() constructor by @joshka in #1547
-
7ad9c29 (linegauge) Customized symbols by @sectore in #1601
With this PR any symbol (
&str) can be used to renderfilledand
unfilledparts ofLineGaugenow. Before that change, only
symbols::line::Set
was accepted.Note:New methods are introduced to define those symbols:
filled_symbolandunfilled_symbol. The method
line_set
is still there, but marked asdeprecated. -
92a19cb (list) Highlight symbol styling by @airblast-dev in #1595 [breaking]
Allow styling for
List's highlight symbolThis change makes it so anything that implements
Into<Line>can be
used as a highlight symbol.BREAKING CHANGE:
List::highlight_symbolcan no longer be used in const
contextBREAKING CHANGE:
List::highlight_symbolaccepted&str. Conversion
methods that rely on type inference will need to be rewritten as the
compiler cannot infer the type.closes:#1443
-
e89a526 (no_std) Portable-atomic integration for targets with no atomic types by @j-g00da in #2076
Improves compatibility with no-std targets that don't support atomic
types.We support three different scenarios depending on the target:
- Terminal applications and other std targets (e.g. espidf):
stdenabled,portable-atomicdisabled
- Embedded targets with atomic types, bare metal x86, etc.:
stddisabledportable-atomicdisabled
- Embedded targets without atomic types (e.g. single-core MCUs):
stddisabled,portable-atomicenabled
Turning on
portable-atomictogether withstdwill fall back tostd
atomic. -
1399d95 (no_std) Make palette and serde features depends on std by @j-g00da in #1919
-
b32f781 (no_std) Make
ratatui-macrosno-std by @j-g00da in #1865 -
3e1c72f (no_std) Make ratatui compatible with
#![no_std]by @j-g00da in #1794 [breaking]Resolves #1781
This PR makes it possible to compile ratatui with
#![no_std].
Also makes me answer "We Are So Embedded" to "Are We Embedded Yet?" -
ab48c06 (no_std) Option to disable layout cache for
no_stdcompatibility by @j-g00da in #1795 [breaking]Resolves #1780
BREAKING CHANGE:Disabling
default-featureswill now disable layout
cache, which can have a negative impact on performance.Layout::init_cacheandLayout::DEFAULT_CACHE_SIZEare now only
available iflayout-cachefeature is enabled. -
09173d1 (no_std) Make
TestBackend::ErrorInfallibleby @j-g00da in #1823 [breaking]BREAKING CHANGE:
TestBackendnow usescore::convert::Infalliblefor
error handling instead ofstd::io::Error -
007713e (no_std) Replace
Backend'sio::Errorusages with associatedErrortype by @j-g00da in #1778 [breaking]Resolves #1775
BREAKING CHANGE:Custom backends now have to implement
Backend::Error
andBackend::clear_region. Additionally some genericBackendusage
will have to explicitly set trait bounds forBackend::Error. -
a42a17e (no_std) Make
ratatui-widgetsno_stdby @j-g00da in #1779Resolves #1776
-
5a232a3 (no_std) Remove redundant
stdusages inratatui-widgetsby @j-g00da in #1762 -
ebe10cd (no_std) Remove redundant
stdusages inratatui-coreby @j-g00da in #1753Resolves #1751
-
08b08cc (rect) Centering by @janTatesa in #1814
Resolves #617
-
ff729b7 (scrollbar) Support retrieving the current position of state by @orhun in #1552
As of now it is possible to change the position of the Scrollbar but not
possible to retrieve the position for further use. e.g.let mut state = ScrollbarState::default(); state.next();
This commit adds a new method "
current_position" (sincepositionis
already taken by the fluent setter) for that purpose:let index = state.get_position(); // yay
See #1545 for the concrete usage of this.
-
b9da192 (serde) Derive Serialize/Deserialize for alignment enums by @j-g00da in #1957
Resolves #1954
-
89b7421 (serde) Derive Serialize/Deserialize for additional structs/enums by @aurreland in #1883
This PR adds
#[derive(Serialize, Deserialize)]to the following
structs:ConstraintDirectionSpacingLayoutAccentedPaletteNonAccentedPalettePalettePaddingBordersBorderTypeListDirectionScrollbarOrientationScrollDirectionRenderDirectionHighlightSpacing
Fixes #1877
-
03f3f6d (style) Allow add/sub modifiers to be omitted in Style serialization. by @rcorre in #2057
It's really useful that Style supports Deserialize, this allows TUI
apps to have configurable theming without much extra code.However, deserializing a style currently fails if
add_modifierand
sub_modifierare
not specified. That means the following TOML config:[theme.highlight] fg = "white" bg = "black"
Will fail to deserialize with "missing field
add_modifier". It should
be possible
to omit modifiers and have them default to "none". -
985cd05 (symbols) Add dashed borders by @theotchlx in #1573
Adds several new border sets:
- ratatui::symbols::border::LIGHT_DOUBLE_DASHED
- ratatui::symbols::border::HEAVY_DOUBLE_DASHED
- ratatui::symbols::border::LIGHT_TRIPLE_DASHED
- ratatui::symbols::border::HEAVY_TRIPLE_DASHED
- ratatui::symbols::border::LIGHT_QUADRUPLE_DASHED
- ratatui::symbols::border::HEAVY_QUADRUPLE_DASHED
And corresponding variants to the ratatui::widgets::BorderType enum
Fixes:#1355
-
4c301e8 (text) Implement
AddAssignforTextby @acuteenvy in #1956This makes it possible to add a second
Textinstance to a first one using the += operator.let mut text = Text::from("line 1"); text += Text::from("line 2");
Style and alignment applied to the second text is ignored (though styles and alignment of lines and spans are copied).
-
ce4856a (widgets) Add the missing constructor to canvas types by @orhun in #1538
Allows constructing
Rectangle,PointsandCircleusing thenew
method instead of initializing with the public fields directly. -
75b78be (uncategorized) Add width() impl for tabs by @joshka in #2049
The purpose of this is to make it easy for apps to easily calculate the
total tab width including all dividers and padding. -
8188ed3 (uncategorized) Implement UnicodeWidthStr for Text/Line/Span by @joshka in #2030
You can now calculate the width of any Text/Line/Span using the
UnicodeWidthStr trait instead of the width method on the type. This also
makes it possible to use the width_cjk() method if needed. -
c845fec (uncategorized) Add conversion from Size to Rect by @joshka in #2028
Rect::from(size)returns a new Rect at the origin (0, 0) with the
specifiedSize -
017af11 (uncategorized) Preserve block titles when merging borders by @j-g00da in #1977
Resolves #1939
-
6dcd53b (uncategorized) Add ergonomic methods for layouting Rects by @joshka in #1909
This commit introduces new methods for the
Rectstruct that simplify
the process of splitting aRectinto sub-rects according to a given
Layout. By putting these methods on theRectstruct, we make it a
bit more natural that a layout is applied to theRectitself, rather
than passing aRectto theLayoutstruct to be split.Adds:-
Rect::layoutandRect::try_layoutmethods that allow splitting a
Rectinto an array of sub-rects according to a givenLayout.Rect::layout_vecmethod that returns aVecof sub-rects.Layout::try_areasmethod that returns an array of sub-rects, with
compile-time checks for the number of constraints. This is added
mainly for consistency with the newRectmethods.
use ratatui_core::layout::{Layout, Constraint, Rect}; let area = Rect::new(0, 0, 10, 10); let layout = Layout::vertical([Constraint::Fill(1); 2]); // Rect::layout() infers the number of constraints at compile time: let [top, main] = area.layout(&layout); // Rect::try_layout() and Layout::try_areas() do the same, but return a // Result: let [top, main] = area.try_layout(&layout)?; let [top, main] = layout.try_areas(area)?; // Rect::layout_vec() returns a Vec of sub-rects: let areas_vec = area.layout_vec(&layout); // you can also explicitly specify the number of constraints: let areas = area.layout::<2>(&layout); let areas = area.try_layout::<2>(&layout)?; let areas = layout.try_areas::<2>(area)?;
-
0c3872f (uncategorized) Add Rect::outer() by @joshka in #1929
Fixes:#211
-
7bc78bc (uncategorized) Add ratatui::run() method by @joshka in #1707
This introduces a new
ratatui::run()method which runs a closure with
a terminal initialized with reasonable defaults for most applications.
This callsratatui::init()before running the closure and
ratatui::restore()after the closure completes, and returns the result
of the closure.A minimal hello world example using the new
ratatui::run()method:fn main() -> Result<(), Box<dyn std::error::Error>> { ratatui::run(|terminal| { loop { terminal.draw(|frame| frame.render_widget("Hello World!", frame.area()))?; if crossterm::event::read()?.is_key_press() { break Ok(()); } } }) }
Of course, this also works both with apps that use free methods and
structs:fn run(terminal: &mut DefaultTerminal) -> Result<(), AppError> { ... } ratatui::run(run)?;
struct App { ... } impl App { fn new() -> Self { ... } fn run(mut self, terminal: &mut DefaultTerminal) -> Result<(), AppError> { ... } } ratatui::run(|terminal| App::new().run(terminal))?;
-
b6fbfcd (uncategorized) Add lifetime to symbol sets by @joshka in #1935
This makes it possible to create symbol sets at runtime with non-static
lifetimes.Fixes:#1722
-
488e5f0 (uncategorized) Make
border!work without importingBordersby @j-g00da in #1918Currently using
border!macro requires explicit import ofBorders
which is unnecessary. -
671c2b4 (uncategorized) Support merging the borders of blocks by @j-g00da
When two borders overlap, they will automatically merge into a single,
clean border instead of overlapping.This improves visual clarity and reduces rendering glitches around corners.
For example:
assert_eq!(Cell::new("┘").merge_symbol("┏", MergeStrategy::Exact).symbol(), "╆"); -
702fff5 (uncategorized) Implement stylize methods directly on Style by @joshka in #1572 [breaking]
This makes it possible to create constants using the shorthand methods.
const MY_STYLE: Style = Style::new().blue().on_black();
Rather than implementing Styled for Style and then adding extension
methods that implement the Stylize shorthands, this implements the
methods as const functions directly on Style.BREAKING CHANGE:
Styleno longer implementsStyled. Any calls to
methods implemented by the blanket implementation of Stylize are now
defined directly on Style. Remove the Stylize import if it is no longer
used by your code.The
reset()method does not have a direct replacement, as it clashes
with the existingreset()method. UseStyle::reset()rather than
some_style.reset()Fixes:#1158
-
4fcd238 (uncategorized) Support no-std for calendar widget by @joshka in #1852
Removes the CalendarEventStore::today() function in no-std environments
-
53cdbbc (uncategorized) Enable serde propagation to backend crates (crossterm, termion) by @ArjunKrish7356 in #1812
This PR propagates the serde feature from the main ratatui crate to the
ratatui-crossterm and ratatui-termion backend crates. Solves #1805 -
6836a69 (uncategorized) Implement styled for other primitives by @aschey in #1684
-
fcb47d6 (uncategorized) Rename Alignment to HorizontalAlignment and add VerticalAlignment by @joshka in #1735 [breaking]
We don't anticipate removing or deprecating the type alias in the near
future, but it is recommended to update your imports to use the new
name.Added a VerticalAlignment enum to make the API more consistent. We don't
have a specific use case for it yet, but it's better to add it now and
be able to use it in the future.BREAKING-CHANGE:The
Alignmentenum has been renamed to
HorizontalAlignmentto better reflect its purpose. A type alias has
been added to maintain backwards compatibility, however there are some
cases where type aliases are not enough to maintain backwards
compatibility. E.g. when using glob imports to import all the enum
variants. This should not affect most users, but it is recommended to
update your imports to use the new name.- use ratatui::layout::Alignment; + use ratatui::layout::HorizontalAlignment; - use Alignment::*; + use HorizontalAlignment::*;
-
2714d6b (uncategorized) Add array and tuple RGB color conversion methods by @joshka in #1703
Other crates (e.g. colorgrad) that deal with colors can convert colors
to a tuple of 3 or 4 u8 values. This commit adds conversion methods from
these types to aColor::Rgbinstance. Any alpha value is ignored.Color::from([255, 0, 0]); Color::from((255, 0, 0)); Color::from([255, 0, 0, 255]); Color::from((255, 0, 0, 255));
-
50ba965 (uncategorized) Add a new RatatuiMascot widget by @Its-Just-Nans in #1584
Move the Mascot from Demo2 into a new widget.
Make the Rat grey and adjust the other colors.frame.render_widget(RatatuiMascot::default(), frame.area());
-
1d28c89 (uncategorized) Add conversions for anstyle by @joshka in #1581
https://crates.io/crates/anstyle makes it possible to define colors in
an interoperable way. This makes it possible for applications to easily
load colors from a variety of formats.This is gated by the anstyle feature flag which is disabled by default.
Bug Fixes
-
a89d3d6 (buffer) Clear behavior with VS16 wide emojis by @nornagon in #2063
This fixes a bug where certain emojis like ⌨️ would sometimes be
"overlaid" onto existing content from the buffer, instead of properly
clearing.This PR was generated by Codex, and validated by me:
- Behavior of the above example code was buggy before this fix (showed
overlaying "b" on top of the keyboard emoji), and fixed after. - The U+FE0F check is not strictly required, but I did note that emoji
without this char don't exhibit the buggy behavior, even without the
fix.
- Behavior of the above example code was buggy before this fix (showed
-
ec30390 (canvas) Round coordinates to nearest grid cell by @joshka in #1507
Previously the canvas coordinates were rounded towards zero, which
causes the rendering to be off by one pixel in some cases. It also meant
that pixels at the extreme edges of the canvas can only be drawn if the
point was exactly on the edge of the canvas. This commit rounds the
coordinates to the nearest integer instead. This may change the output
for some apps using Canvas / Charts. -
afd1ce1 (canvas) Lines that start outside the visible grid are now drawn by @renesat in #1501
Previously lines with points that were outside the canvas bounds were
not drawn at all. Now they are clipped to the bounds of the canvas so
that the portion of the line within the canvas is draw.To facilitate this, a new
Painter::bounds()method which returns the
bounds of the canvas is added.Fixes:#1489
-
2b0a044 (ci) Add contents write permission to release-plz PR by @marcoieni in #2119
https://release-plz.dev/docs/github/quickstart#3-setup-the-workflow
-
18e70d3 (crossterm) Terminal should keep Bold when removing Dim by @MarSik in #1541
The Dim removal should behave the same as the logic for Bold removal
that sends NormalIntensity sequence and then restores Dim when needed. -
dca331c (demo) Support tab key in demo2 example by @orhun in #1726
see #1721
Not sure what caused this - it's been there for a while probably and we
didn't realize it since we useddemo2-destroymostly. -
0fd4753 (examples) Run the correct example for chart by @orhun in #1679
fixes #1678
-
39479e2 (examples) Ensure that example projects are not published by @orhun in #1672
-
9314312 (layout) Feature flag cache related types by @joshka in #1842
-
2dd1977 (layout-cache) Import
NonZeroUsizeonly whenlayout-cacheis enabled by @j-g00da in #1839This silences unused import warning, when
layout-cacheis disabled. -
564a9d7 (line-gauge) Pad default label to display 3 numbers by @martinetd in #2053
Display the default label of the LineGauge widget padded to fill 3 cells.
This makes it so that the label doesn't shift around when going from a
single digit to double / triple digits.To maintain the existing behavior, use a custom label by calling
.label()
on the LineGauge. -
a692a6e (lint) Apply rust 1.84 clippy suggestions by @joshka in #1612
The canvas map constants are now statics instead.
Fixes
https://rust-lang.github.io/rust-clippy/master/index.html\#large_const_arrays -
2e54d5e (macros) Use $crate re-export in text macro by @airblast-dev in #1832
-
79d5165 (no_std) Propagate
stdfeature flag to dependencies by @j-g00da in #1838Disables
stdfeature flags in dependencies and only enables them with
ratatuiandratatui-core'sstdfeature flag. This partially fixes the
issue of still depending onstd, whenstdfeature flag is disabled. -
00da8c6 (no_std) Provide
f64polyfills forno_stdcompatibility by @j-g00da in #1840Related:rust-lang/rust#137578
-
3b13240 (scrollbar) Check for area.is_empty() before rendering by @farmeroy in #1529
This adds the
area.is_empty()back into the scrollbar render method.
Without it, the widget panics if the height is 0. -
f57b696 (span) Dont render control characters by @EdJoPaTo in #1312
-
2ce958e (table) Allow display of additional table row, if row height > 1 by @Lunderberg in #1452
-
0a25bc1 (tests) Update the stderr snapshot for ratatui-macros by @orhun in #2161
New 🦀 broke the CI
-
5fa342c (widgets) Fix centered block title truncation by @ognis1205 in #1973
Previously block titles that were aligned center were
truncated poorly (aligned to the left, and the last
non-fitting title would be truncated on the left and right.
This now truncates the titles more obviously centered. -
1fe64de (uncategorized) Include underline color in anstyle conversion by @aschey in #2004
Underline color wasn't included in the style conversion logic.
-
c1b8528 (uncategorized) Panic when rendering widgets on too small buffer by @j-g00da in #1996
Fixes panic on overflow on horizontal
BarchartandRatatuiMascotand adds proper tests to all widgets.
-
08b21fa (uncategorized) Fix panic when rendering a
Paragraphout of bounds by @jwodder in #1670Fixes #1667.
-
80bc818 (uncategorized) Fix truncation of left aligned block titles by @joshka in #1931
truncate the right side of left aligned titles rather than the left side
of right aligned titles. This is more obvious as the left side of text
often contains more important information. And we generally read
left to right.This change makes centered titles overwrite left aligned titles and
right aligned titles overwrite centered or left aligned titles.Fixes:#358
-
21e3b59 (uncategorized) Fix handling of multi-byte chars in bar chart by @joshka in #1934
The split_at method requires that the split point is at a valid utf8
character boundary.Fixes:#1928
-
e1e4004 (uncategorized) Derive copy for list state by @janTatesa in #1921
-
12cb5a2 (uncategorized) Allow canvas area to exceed u16::MAX by @Daksh14 in #1891
This allows Canvas grids where the width * height exceeds u16::MAX by
converting values to usize earlier in several methods.Fixes:#1449
-
09cc9ef (uncategorized) Typo in changelog by @joshka in #1857
-
c238aca (uncategorized)
padding_right()should set right padding instead of left by @sxyazi in #1837Fixes #1836
-
c90ba97 (uncategorized) Avoid unnecessary imports in minimal build by @cgzones in #1787
core::ops::Range is only used with the feature
scrolling-regions.
Ensure a minimalcargo checkreports no warnings. -
416ebdf (uncategorized) Correct clippy errors introduced by rust 1.86.0 update by @j-g00da in #1755
New version of rust (1.86.0) caused CI to fail.
-
4eac5b2 (uncategorized) Make deprecation notes more helpful by @joshka in #1702
AI coding assistants use the deprecation notes to automatically suggest
fixes. This commit updates the deprecation notes to push those tools to
suggest the correct replacement methods and types.Specifically, AI tools often suggest using
Buffer::get(x, y), because
of their training data where this was prevalent. When fixing these
deprecations, they often incorrectly suggest usingBuffer::get(x, y)
instead ofBuffer[(x, y)]. -
35a8642 (uncategorized)
Rect::positions()should be empty when width is 0 and height is nonzero by @jwodder in #1669Fixes #1666.
-
f5fc819 (uncategorized) Avoid extra line break on whitespace only lines when wrapping paragraphs by @dotdash in #1636
Currently whitespace only lines produces an extra line break when
trimming is disabled, because both the trimmed as well as the
non-trimmed line get inserted. Fix this by only inserting the
non-trimmed one. -
2892bdd (uncategorized) Rust 1.83 clippy lints by @joshka in #1527
https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
-
36e2d1b (uncategorized) Add feature(doc_cfg) when generating docs by @joshka in #1506
-
4d7704f (uncategorized) Make StatefulWidget and Ref work with unsized State by @thscharler in #1505
StatefulWidget::State and StatefulWidgetRef::State are now ?Sized.
This allows implementations of the traits to use unsized types for the
State associated type. This is turn is useful when doing things like
boxing different stateful widget types with State which implements
Any, are slices or any other dynamically sized type. -
7b87509 (uncategorized) Typo by @marcoieni in #1480
Refactor
-
8d60e96 (examples) Use crossterm event methods by @joshka in #1792
Crossterm 0.29 introduced methods to easily check / extract the event
type. E.g. as_key_press_event() and is_key_press(). This commit
updates the examples to use these methods instead of matching on
the event type. This makes the code cleaner and easier to read.Also does a general cleanup of the event handling code in the examples.
-
07bec55 (no_std) Make usages of std explicit in ratatui-core. by @ed-2100 in #1782
This commit does the following:
- Adds
#[no_std]tolib.rs. - Adds
extern crate std;tolib.rs. - Updates
ratatui-coreto explicitlyuseitems from std and alloc. - Prefers
use-ing alloc over std when possible.
Explanation:
This allows usages of
stdinratatui-coreto be clearly pointed out
and dealt with individually.Eventually, when
stdis to be feature gated, the associated commit
will be much cleaner. - Adds
-
f132fa1 (table) Small readability improvements by @joshka in #1510
-
02e53de (uncategorized) Make use of iter::repeat_n() by @cgzones in #1788
Applied via clippy --fix.
Available since 1.82.0. -
a195d59 (uncategorized) Move xtask commands to small modules by @joshka in #1620
-
904b0aa (uncategorized) Move symbols to modules by @joshka in #1594
-
7c8573f (uncategorized) Rearrange selection_spacing code by @raylu in #1540
-
217c57c (uncategorized) Modularize backends by @orhun in #1508
Backend code is now moved to
ratatui-crossterm,ratatui-termionand
ratatui-termwiz. This should be backwards compatible with existing code. -
e461b72 (uncategorized) Move {Stateful,}Widget{,Ref} types into individual files by @joshka in #1479
This is a preparatory refactoring for modularization. No user visible
changes.
Documentation
-
40e96a2 (block) Add collapsed border example by @joshka in #1899
-
d291042 (block) Revise the block example by @orhun in #1520
- Moves the block example from
ratatuitoratatui-widgets - Simplifies the example (bordered, styled, custom borders)
see #1512
- Moves the block example from
-
0951da5 (breaking-changes) Improve migration guide for
Backend::Errorby @j-g00da in #1908Related:fujiapple852/trippy#1588
-
bbe1cf9 (breaking-changes) Change MSRV to 1.85 by @j-g00da in #1896
The minimum supported Rust version is now for
ratatuiv0.30 is 1.85 -
c7912f3 (breaking-changes) Fix header level by @j-g00da in #1825
-
eb24938 (changelog) Add note to ratatui-macros' changelog
-
73488ab (contributing) Fix link to
widgets_block_renderstest by @ognis1205 in #2101The
CONTRIBUTING.mdreferencedtests/widgets_block.rs, but the
correct path isratatui/tests/widgets_block.rs. Updated the link so
that readers can navigate to the test example without 404 error.
-
1197b2a (contributing) Add note about using nightly for formatting by @joshka in #1816
-
3ae6bf1 (contributing) Use cargo-xtask for instructions by @orhun in #1509
- Updates
CONTRIBUTING.mdabout the usage ofxtask - Removes
Makefile.toml
- Updates
-
22e3e84 (core) Remove link to Paragraph widget by @orhun in #1683
-
200b217 (examples) Add VHS tapes and docs for widget examples by @orhun in #2114
fixes #1982
Later on I'll figure out an easy way to regenerate this in the CI and
possibly do the same for the app examples' VHS tapes. That's why I
haven't added a script or mentioned anything in the docs yet (hint:
#1721)
-
861fbdf (examples) Fix a typo by @j-g00da in #1890
Makes CI typos check pass again
-
882cc3c (examples) Update app examples with tapes by @orhun in #1673
-
4393fae (examples) Move scrollbar example to examples folder by @orhun in #1665
-
9ea70e2 (examples) Move widget-impl example to examples folder by @orhun in #1663
-
774ab78 (examples) Move widget-ref-container example to examples folder by @orhun in #1664
see #1512
-
910d16e (examples) Move user-input example to examples folder by @orhun in #1659
-
dbfb7da (examples) Move table example to examples folder by @orhun in #1657
-
cb2a58a (examples) Move tracing example to examples folder by @orhun in #1658
-
7e00b64 (examples) Move panic example to examples folder by @orhun in #1655
-
8127590 (examples) Move modifiers example to examples folder by @orhun in #1654
-
7c40c0b (examples) Move popup example to examples folder by @orhun in #1656
see #1512
-
d87354f (examples) Move list example to examples folder by @orhun in #1653
see #1512
also renames it to todo-list
-
621226f (examples) Move inline example to examples folder by @orhun in #1651
-
9ba7d25 (examples) Move hyperlink example to examples folder by @orhun in #1650
-
bb94d1c (examples) Move minimal example to examples folder by @orhun in #1649
-
9f399ac (examples) Move gauge example to examples folder by @orhun in #1646
-
104d6a6 (examples) Move custom-widget example to examples folder by @orhun in #1644
-
fa8ca01 (examples) Move flex example to examples folder by @orhun in #1642
-
f5fde0e (examples) Move constraints example to examples folder by @orhun in #1641
-
fc70288 (examples) Move constraint-explorer example to examples folder by @orhun in #1640
-
325f961 (examples) Move hello-world example to examples folder by @orhun in #1647
-
867c4bc (examples) Move colors-rgb example to examples folder by @joshka in #1582
- docs: move colors-rgb example to examples folder
- docs: update main examples README
-
72334ed (layout) Update documentation to point to
kasuarisolver by @a-kenji in #2003 -
2be9ccb (layout) Remove unnecessary path prefix by @j-g00da in #1766
-
b669ceb (layout) Change
cassowarytokasuaricrate reference by @j-g00da in #1765 -
f907c74 (license) Update copyright years by @LVivona in #1639
Update MIT Licence to copyright year 2025
-
68b9f67 (readme) Add
Built with Ratatuibadge for downstream projects by @harilvfs in #1905 -
6e43672 (readme) Reimagine README.md by @orhun in #1569
This is the result of the re-imagination of a more suitable README.md. It
is simpler and shorter: not giving more information to the user than
they actually need.Also updates the quickstart code with the up-to-date version and adds
link to templates which was missing.
-
8f28247 (readme) Correct examples links by @HoKim98 in #1484
-
9f90f74 (readme) Fix broken link by @nilsmartel in #1485
-
260af68 (readme) Include iocraft as an alternative by @kdheepak in #1483
-
8e5151f (rect) Fix typo in the Rect::outer function comments by @orhun in #2123
-
40f13c6 (rect) Update the outdated comment for Rect::area() by @eqsdxr in #2100
The return value of Rect.area() is no longer of u16 type, and the value
is not being clumped anymore. -
9a930a6 (terminal) Made usage of Terminal::get_frame() clearer by @Blaeriz in #2071
Closes : #1200
-
b08b4cb (terminal) Add disclaimer about panics to Terminal::new by @lolbinarycat in #2088
part of #2087
cc @orhun
-
dafb716 (widgets) Add example for grouped barchart by @orhun in #1566
related #1512
-
ed5dd73 (widgets) Add example for tabs by @orhun in #1559
related #1512
Also removes the tabs example from ratatui crate since it overlaps with
this new example in terms of functionality and it was not following the
general theme of other examples. -
fab5321 (widgets) Add example for scrollbar by @orhun in #1545
Related to: #1512
-
898aef6 (widgets) Add example for list by @orhun in #1542
Related to: #1512
-
452366a (widgets) Add example for sparkline by @orhun in #1556
related #1512
Also removes the sparkline example from ratatui crate since this example
is a simplified and easier to understand version of that -
6ddde0e (widgets) Add example for table by @orhun in #1557
related #1512
-
93ad6b8 (widgets) Update values in chart example by @orhun in #1558
better stonks
-
15f442a (widgets) Add example for paragraph by @orhun in #1544
related #1512
Also removes the paragraph example from
ratatuisince these examples
are more or less the same. -
17bba14 (widgets) Move the logo example to widgets by @orhun in #1543
related #1512
Also updates the code to make it consistent with the other examples
-
f2451e7 (widgets) Add example for gauge by @orhun in #1539
related #1512
-
4f0a8b2 (widgets) Add example for canvas by @orhun in #1533
related #1512
-
91147c4 (widgets) Add example for chart by @orhun in #1536
stonks
-
6dd25a3 (widgets) Add example for calendar by @orhun in #1532
related #1512
-
99ac005 (widgets) Add simple barchart example by @joshka in #1511
-
f8b0594 (uncategorized) Fix: fix typos by @j-g00da in #2129
This fixes the pipeline after bumping typos.
-
9998000 (uncategorized) Use shields.io badge by @LitoMore in #2040
Related to:
The Ratatui icon is available on shields.io now ✌️
And it's customizable. There are more configurations at
https://shields.io/badges.Here are some examples:
    
I also created a PR to the ratatui-website project to update the badge.
Here is the PR: -
71ef65b (uncategorized) Add section on collaborative development to contributing doc by @joshka in #2029
-
cba5cca (uncategorized) Update heading image for Ratatui 0.30.0 release 🎉 by @j-g00da in #2000
-
9836f07 (uncategorized) Add AI contribution guidelines by @joshka in #2013
-
98f85b8 (uncategorized) Update link to scrollable widgets RFC by @MatrixFrog in #1994
-
055522e (uncategorized) Add docs for authoring widget crates by @j-g00da in #1955
- added Authoring Widget Libraries sub-section
- moved built-in and third-party widgets sections higher
-
617d318 (uncategorized) Improve Block docs by @joshka in #1953
-
8e2d568 (uncategorized) Improve layout related docs by @joshka in #1948
Adds module level docs and more comprehensive docs on all the types in
the layout moduleFixes #1937
-
4c708dd (uncategorized) Improve docs for run/init/restore etc. by @joshka in #1947
- docs: document the init module
- docs: use the ratatui::run() methods in the main doc
- docs: add more intradoc / website links and historical perspective
on Terminal / backend - docs: add notes about new run/init/restore methods and the
defaultterminal type to terminal docs
-
5620e06 (uncategorized) Add crate organization sections to workspace by @joshka in #1946
Adds summary-level crate organization documentation to all crates
explaining the modular workspace structure and when to use each crate.
Links to ARCHITECTURE.md for detailed information. -
cfb65e6 (uncategorized) Add examples for handling state by @joshka in #1849
Added comprehensive state management examples covering both immutable
and mutable patterns and documentation to help developers choose the
right approach for their applications. -
3de41a8 (uncategorized) Document widgets module by @joshka in #1932
Adds a good overview of the use and implementation of widget traits.
Goals with the doc rewrite:
- document the rationale for the ratatui-widgets crate with info for app
builders and widget makers. - Show how to use the widgets for rendering as well as implement the
traits- document the differences and reasons for each trait - document the historical perspective (to make it easy to understand
older Ratatui apps as well as migrate to newer approaches - give recommended approaches to implementing traits
- explain the differences between Consuming and Shared / Mutable
Reference implementations of Widget - explain the differences between using StatefulWidget and Mutable
References - Explain the use case for WidgetRef and StatefulWidgetRef
- Link out to third part widget lists
Fixes:#366
- document the rationale for the ratatui-widgets crate with info for app
-
ca2ad4a (uncategorized) Simplify ratatui-macro docs by @joshka in #1923
-
92b6a16 (uncategorized) Fix grammar in ratatui-widgets README by @sevki in #1885
-
da05957 (uncategorized) Add widget-ref-container example by @joshka in #1603
Implements ideas alluded to by
https://discord.com/channels/1070692720437383208/1072907135664529508/1323061053990637640
and followup conversations. -
1798512 (uncategorized) Fix wording in user_input example by @dawedawe in #1611
Fix wording in
user_input.rsexample. -
03066d8 (uncategorized) Fix punctuation in canvas.rs documentation by @dawedawe in #1583
Fix end of sentence punctuation in canvas.rs docs.
-
e411d9e (uncategorized) Add input form example by @joshka in #1551
Demonstrates how to manage the cursor and input focus with a simple
form. Uses an enum to track the current input field and passes the
input events to the active field.This is similar to the json tutorial on the website, but a bit simpler
-
ed071f3 (uncategorized) Add mouse-drawing example by @joshka in #1546
Demonstrates how to handle mouse events
-
46902f5 (uncategorized) Improve docs for workspace crates by @orhun in #1490
Overall makes improvements in the documentation of the workspace crates and checking them.
-
a6b5792 (uncategorized) Fix example link in readme by @thomas-tacquet in #1462
Performance
-
1f41a61 (paragraph) Avoid unnecessary work when rendering by @alexpasmantier in #1622
Improve render times for paragraphs that are scrolled.
Currently all
LineComposers are considered to be state machines which
means rendering a paragraph with a given Y offset requires computing the
entire state up to Y before being able to render from Y onwards.While this makes sense for Composers such as the
WordWrapper(where
one needs to consider all previous lines to determine where a given line
will end up), it means it also penalizes Composers which can render a
given line "statelessely" (such as theLineTruncator) which actually
end up doing a lot of unnecessary work (and on the critical rendering
path) when the offset gets high. -
ba9eed7 (table) Replace while loop with simple min operation by @EdJoPaTo in #1747
Styling
-
ac60de3 (uncategorized) Fix wrapping in doc comment by @joshka in #2104
-
2739391 (uncategorized) Use Module imports_granularity by @joshka in #1728
I was swayed by the arguments about this made by the compiler team In
rust-lang/compiler-team#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
runningcargo 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.
- Removes all usages of `ratatui::{crossterm, termion, termwiz}`` in the
Testing
-
db65aa0 (bench) Add benchmark for text by @orhun in #2160
-
a21501f (bench) Added a benchmark for constraints by @kashregister in #2043
I've added a new benchmark for constraints, which only takes into
account the time it takes to generate a full layout using a single type
of constraints only. Avoided rendering here as it resulted in more
inaccurate benchmarks, and i believe it should be separated nonetheless. -
39cd313 (layout) Add visual buffer tests for Rect methods by @orhun in #2124
-
8aefc06 (macros) Regenerate trybuild stderr by @ognis1205 in #2093
Overview
Updated the
.stderrfile corresponding to the
ratatui-macros/tests/ui/fails.rscompile-fail test.Changes
- Updated
tests/ui/fails.stderrto match the new compiler output.
Impact
- Affects only the trybuild UI tests
- No impact on production code
Notes
- The
.stderrwas generated usingTRYBUILD=overwrite cargo test.
Closes #2094
- Updated
-
deb1b8e (uncategorized) Ensure Style::new() and Style::default() are equivalent by @cgzones in #1789
Miscellaneous Tasks
-
abe2f27 (backend) Change From impls to new backend specific IntoBackend and FromBackend traits by @joshka in #1464 [breaking]
Adds two traits
IntoCrosstermandFromCrosstermfor converting
between ratatui and crossterm types. This is necessary in order to avoid
the orphan rule when implementingFromfor crossterm types once the
crossterm types are moved to a separate crate.Similarly Termwiz and Termwiz gain FromTermion, IntoTermion, FromTermwiz
and IntoTermwiz traits.BREAKING CHANGE:The
FromandIntoimpls for backend types are now
replaced
with specific backend traits.+ use ratatui::backend::{FromCrossterm, IntoCrossterm}; let crossterm_color = crossterm::style::Color::Black; - let ratatui_color = crossterm_color.into(); - let ratatui_color = ratatui::style::Color::from(crossterm_color); + let ratatui_color = ratatui::style::Color::from_crossterm(crossterm_color); - let crossterm_color = ratatui_color.into(); - let crossterm_color = crossterm::style::Color::from(ratatui_color); + let crossterm_color = ratatui_color.into_crossterm(); let crossterm_attribute = crossterm::style::types::Attribute::Bold; - let ratatui_modifier = crossterm_attribute.into(); - let ratatui_modifier = ratatui::style::Modifier::from(crossterm_attribute); + let ratatui_modifier = ratatui::style::Modifier::from_crossterm(crossterm_attribute); - let crossterm_attribute = ratatui_modifier.into(); - let crossterm_attribute = crossterm::style::types::Attribute::from(ratatui_modifier); + let crossterm_attribute = ratatui_modifier.into_crossterm();
Similar conversions for
ContentStyle->StyleandAttributes->
Modifierexist for Crossterm,
and all the Termion and Termwiz types.
-
0a47ebd (bencher) Update bencher CLI usage by @epompeii in #1470
-
b46778d (breaking-changes) Add details to
no_std-related breaking changes by @j-g00da in #1828Some corrections and added details to BREAKING-CHANGES.md.
I decided to remove:
Backendnow usesSelf::Errorfor error handling instead of
std::io::ErrorTerminal<B>now usesB::Errorfor error handling instead of
std::io::Error
...as we are still using
std::io::Errorin built-in backends, so this
will only be breaking if a third-party backend decides to use a custom
error other thanstd::io::Error, which would be a breaking change in
downstream and notratatui.The exception to that is
TestBackend, which usesInfallible, but
this already has its own breaking changes entry. -
a0979d6 (build) Remove cargo lint by @joshka in #1549
Duplicate crate lint is too noisy and sensitive to upstream changes
-
ae43ea7 (cell) Use Option instead of space (" ") for symbol by @joshka
This change makes the
Cell::symbolfield anOption<CompactString>,
allowing it to represent an empty cell asNoneinstead of an empty
string. The rationale for this is to later allow the merge symbol
functionality to act differently based on whether a cell has previously
held a symbol or not, rather than always merging with an empty string.
This will help make it possible to merge borders with titles with spaces
and other symbols, without assuming that an empty string is always
equivalent to no symbol.- Default is now derived as
Option::Noneworks correctly. - PartialEq and Eq implementations are updated to treat
Nonethe same
as an empty string. - merge_symbol against an empty cell will now just set the symbol
rather than calling MergeStrategy::merge with an empty string. - PartialEq, and Hash are manually implemented instead of being
derived, and are updated to treatNoneequal to an empty string.
- Default is now derived as
-
887a636 (ci) Override RUSTUP_TOOLCHAIN for the check step by @ognis1205 in #2116
Summary
Fixes an issue where the "check" CI jobs for MSRV and stable were
unintentionally using the stable toolchain fromrust-toolchain.toml
instead of the matrix-specified toolchain.Details
- Added
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}to the "check" job
in CI configuration.
Additional Context
- Added
-
34baaf1 (ci) Override the toolchain for CI runs by @ognis1205 in #2106
Summary
Fixes an issue where the beta CI jobs were unintentionally using the
stable
toolchain fromrust-toolchain.tomlinstead of the matrix-specified
toolchain.
This caused clippy to run against the wrong version.Details
- Added
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}to the CI
configuration
Additional Context
- Added
-
e48aa9e (ci) Stop publish-alpha from running on forks by @j-g00da in #1916
I can't sleep because every Saturday alpha release fails on my ratatui
fork. This should fix my insomnia. -
b3f3c9b (ci) Disable running release-plz on forked repositories by @orhun in #1730
See https://github.com/jdssl/ratatui/pull/1#issuecomment-2739366609
-
eaa4038 (ci) Install pre-built binaries for cargo-rdme by @orhun in #1477
install-actionusescargo-binstallto install the pre-built binaries
ofcargo-rdme(which was released in
https://github.com/orium/cargo-rdme/releases/tag/v1.4.7).This will make the
check-readmestep faster in CI (now takes only 10
seconds). -
e5e2316 (ci) Add check for keeping README.md up-to-date by @orhun in #1473
-
2ef3583 (ci) Replace cargo-make with a custom cargo-xtask by @joshka in #1461
This removes the need for cargo-make and replaces it with a custom xtask
binary. See https://github.com/matklad/cargo-xtask for info.Rearranges the CI workflow to use the new xtask and simplify which
workflows that run.
-
98df774 (core) Move core types to ratatui-core by @joshka in #1460
The buffer, layout, style, symbols, text, and the top level of widgets
modules are moved to ratatui-core. This is the first step in
modularizing the library so that the core types can be used in other
projects without the need for the backend / widgets types.This helps reduce the need for updating other crates as often due to
semver changes outside of the core types.
-
35eba76 (example) Move demo2 to top level folder by @joshka in #1524
-
5f57d35 (examples) Add colors explorer demo app by @orhun in #1580
related #1512
Moves the colors examples to apps
-
5c021bf (examples) Add chart demo app by @orhun in #1579
related #1512
Moves the chart example to apps
-
9721300 (examples) Add canvas demo app by @orhun in #1578
related #1512
This moves the canvas example to the apps and adds some interactivity
via changing the marker by pressing enter. -
a6a1368 (examples) Add calendar explorer demo app by @orhun in #1571
Related to #1512
As discussed, this moves the calendar example from ratatui to app
examples as an "explorer" example. It also adds interactivity where you
can press s to toggle between different styles of calendars.
-
819e92c (examples) Add weather demo app by @orhun in #1567
related to #1512
-
b5f7e44 (examples) Move async example to apps by @joshka in #1503
Move async example to examples/apps/async as full project.
Simplify a little by removing the need for the github api token. -
17316ec (github) Enable sponsorship button by @orhun in #1478
-
d02995f (gitignore) Add
.envto.gitignoreby @j-g00da in #1949 -
b4a71e5 (lint) Add
stdinstead ofcore/alloclints toratatui-widgetsby @j-g00da in #1763Resolves #1761
-
cef617c (lint) Add
stdinstead ofcore/alloclints toratatui-coreby @j-g00da in #1759Resolves #1752
-
d3f01eb (lint) Ensure lint config is correct by @joshka in #1528
- Move lints to workspace manifest
- Add lint config to backend crates
- Fix one small lint error
-
9fb0544 (release) Initialize release-plz by @orhun in #1550
See #1550
-
60a8191 (widgets) Move crossterm to dev-dependencies by @j-g00da in #1834
Crossterm in widgets is used only in tests.
-
2b7ec5c (widgets) Enable calendar widget as default by @orhun in #1521
We now expect that you disable the default features if you want less
dependencies -
d201b8e (xtask) Check lints for only library targets by @orhun in #1531
Makes it possible to filter workspace packages by their targets.
(e.g. when we want to retrieve all the binary targets / examples, etc.) -
297d264 (uncategorized) Update maintainers by @orhun in #2122
-
91fa249 (uncategorized) Remove obsolete doc_auto_cfg feature by @ognis1205 in #2103
The doc_auto_cfg feature was incorporated into the doc_cfg feature
in rust-lang/rust#138907Closes #2102
-
46e7c6c (uncategorized) Document rustfmt options by @joshka in #2055
-
719badb (uncategorized) Skip
alphaandbetatags incliff.tomlby @j-g00da in #2026 -
0afb1a9 (uncategorized) Ignore
betaandrctags incliff.tomlby @j-g00da in #2025 -
5ae224b (uncategorized) Prepare for beta release by @j-g00da in #2022
-
cfebd68 (uncategorized) Fix typo in CONTRIBUTING.md by @kdheepak in #2001
Removes a hanging opening code block:
```suggestion -
572749f (uncategorized) Update contributing guidelines and add copilot-instructions by @joshka in #1998
See
https://docs.github.com/en/copilot/how-tos/agents/copilot-code-review/using-copilot-code-reviewThese instructions will be used by copilot when it performs automated PR
reviews, and helps provide guardrails for our standards. Over time we
might grow these to capture any consistent problems that we start seeing
when reviewing.
-
0148b62 (uncategorized) Remove cargo_metadata dep from xtask by @joshka in #1993
Removed due to hard N-2 MSRV requirement, whereas we use a soft N-2
(only update when necessary). This makes it painful to be able to test
our actual msrv (as the xtask has to be built with the version that its
deps support, while still wanting to check the msrv version, so we'd end
up with 2 versions in the one CI task and this would get annoying to
check).See rust-lang/cargo#15746 for more details.
Partially implements #1820 - mainly as a problem solution rather than a
specific goal to use cargo-hack -
9bc5739 (uncategorized) Remove clap-cargo from xtask by @joshka in #1992
Removed to avoid needing to bump our msrv. See
https://github.com/rust-lang/cargo/issues/15746\#issuecomment-3071774343
for more details. -
0e10170 (uncategorized) Change Borders::NONE to a proper const by @joshka in #1985
https://docs.rs/bitflags/latest/bitflags/#zero-bit-flags
Flags with no bits set should be avoided because they interact
strangely withFlags::contains
andFlags::intersects.
A zero-bit flag is always contained, but is never intersected. The names
of zero-bit flags can be parsed, but are never formatted.Removing this simplifies the manual Debug impl that previously had to
check for Borders::NONE and now does not. -
8e3bd11 (uncategorized) Add svg logo asset by @LitoMore in #1967
Added a shields.io style svg logo and a nicer version of the original logo.
The simplified icon will be added and available directly from shields.io via: -
92bb9b2 (uncategorized) Remove
Titlereferences by @j-g00da in #1943 -
d6647db (uncategorized) Remove some allow attributes for fixed clippy bugs by @joshka in #1944
-
3f48bde (uncategorized) Remove OpenSSL license by @joshka in #1942
Only keep licenses in the allow list that are actually used
-
4c86513 (uncategorized) Remove block::Title by @joshka in #1926
The title alignment is better expressed in the
Lineas this fits more
coherently with the rest of the library.BREAKING CHANGES:
widgets::blockis no longer exportedwidgets::block::Titleno longer existswidgets::block::Positionis nowwidgets::TitlePositionBlock::title()now acceptsInto::<Line>instead ofInto<Title>BlockExtis now exported at widgets::BlockExt
Closes:#738
-
770cb7c (uncategorized) Add tests for combining list styles by @joshka in #1884
-
dbfb2c3 (uncategorized) Upgrade to Rust Edition 2024 by @MatrixFrog in #1863
https://doc.rust-lang.org/edition-guide/rust-2024/index.html
Fixes #1727
-
7cb35d4 (uncategorized) Update to Rust version 1.85.0 by @MatrixFrog in #1860
This is a small step toward fixing #1727
-
a07f5be (uncategorized) Move dependency management to workspace by @joshka in #1858
Move all dependency management to the workspace level. This makes it
easier to manage dependencies across multiple crates in the workspace.This also changes the versions of each dependency to track based on the
semver compatible version of the dependency (e.g. 0.1 instead of 0.1.0
or 2.9 instead of 2.9.0 to avoid having to regularly update the toml
files and to communicate that Ratatui will still generally work with
versions of the dependencies that are not the fully latest version. The
exact version of the dependencies is still tracked in the Cargo.lock
file.Several dependencies that are fairly stable are changed to track a less
specific version (e.g. serde 1 instead of 1.0.x).The following dependencies are updated to their latest versions:
- bitflags (2.3 -> 2.9)
- strum (0.26 -> 0.27)
- strum_macros (0.26 -> 0.27)
- all other semver compatible updates
-
1874b9d (uncategorized) Move time to dev-dependencies by @j-g00da in #1835
-
d88cd29 (uncategorized) Add 'const' to functions where possible. by @MatrixFrog in #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
-
bb06889 (uncategorized) Fix io_other_error clippy lints by @joshka in #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
-
0f80c5e (uncategorized) Use expect() instead of allow() for lint overrides by @cgzones in #1786 [breaking]
BREAKING CHANGE:MSRV is now 1.81
-
fe8577c (uncategorized) Remove paste dependency by @joshka in #1713
The paste crate is no longer maintained. Replaces the usages of this in
the Stylize declarative macros with hard coded values. These macros are
internal implementation detail to ratatui and so the changes should have
no impact on users.Fixes:#1712
-
255e466 (uncategorized) Cargo update - pull in fixed version of ring crate by @joshka in #1710
-
f05feac (uncategorized) Sort dependencies in Cargo.toml by @canac in #1662
-
7eab88f (uncategorized) Remove unused deps by @joshka in #1661
-
37a1c6f (uncategorized) Remove some examples by @orhun in #1645
-
6f21319 (uncategorized) Rename examples with clashing names by @joshka in #1597
These will eventually be moved / consolidated elsewhere, but this clears
the warnings while building for now. -
11cbb2b (uncategorized) Use cargo xtask for bacon clippy command by @joshka in #1592
-
b544e39 (uncategorized) Use clap instead of argh for demo example by @joshka in #1591
-
9a54198 (uncategorized) Make source files non-executable by @orhun in #1577
find . -type f -not -path './.git/*' -not -name '*.bash' -exec chmod 644 {} +
fixes #1576
-
357ae7e (uncategorized) Move terminal types to ratatui-core by @joshka in #1530 [breaking]
- Move Terminal, TerminalOptions, ViewPort, CompletedFrame, Frame to
ratatui-core crate - Move render_widget_ref() and render_stateful_widget_ref() to extension
trait (FrameExt) due as the Ref types are unstable and kept in the
main lib instead of -core - Fix rustdoc errors / feature config issues
BREAKING CHANGE:to call
Frame::render_widget_ref()orFrame::render_stateful_widget_ref()you now need to import the
FrameExt trait fromratatui::widgetsand enable the
unstable-widget-reffeature. - Move Terminal, TerminalOptions, ViewPort, CompletedFrame, Frame to
-
21e62d8 (uncategorized) Move the demo example to main folder by @joshka in #1523
Add a top level examples folder for more app-ish examples
Move the demo example into the top level folder.
-
fbf6050 (uncategorized) Prepare alpha modularization release by @joshka in #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
-
e4e95bc (uncategorized) Remove --color always flags from bacon.toml by @joshka in #1502
No longer necessary as of bacon 3.3
-
a41c97b (uncategorized) Move unstable widget refs to ratatui by @joshka in #1491 [breaking]
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 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: #1388
- implementations of WidgetRef for all internal widgets are removed and
-
e7085e3 (uncategorized) Move widgets into ratatui-widgets crate by @joshka in #1474
All the widgets now live in their own ratatui-widgets crate, but are re-exported in the main ratatui crate.
This makes it easier to use portions of the ratatui library and is part of the effort to modularizePart of: #1388
-
f1d0a18 (uncategorized) Move ratatui crate into workspace folder by @joshka in #1459
This is the first step towards modularization. Handling the move
as a separate step rather than combining it should make it easier
to rebase other PRs when necessary.
-
55fb2d2 (uncategorized) Update repo links to ratatui instead of ratatui-org by @joshka in #1458
Continuous Integration
-
c01b7d4 (uncategorized) Remove old release workflows by @joshka in #2015
-
02ca587 (uncategorized) Add environment to release workflow by @joshka in #1983
-
821611f (uncategorized) Use trusted publishing by @joshka in #1981
https://blog.rust-lang.org/2025/07/11/crates-io-development-update-2025-07/
-
1f0c2ee (uncategorized) Audit github workflows with zizmor by @joshka in #1961
Fixes #1950
-
a0746ba (uncategorized) Add job to check no-std build by @joshka in #1851
Uses x86_64-unknown-none as an arbitrary target that does not support
the std libraryResolves:#1843
-
5a3be12 (uncategorized) Run clippy using rust stable and beta by @joshka in #1757
This makes it possible to pre-emptively catch upcoming clippy issues. We
should not block PRs on these generally (unless the PR introduces a
valid clippy warning), so the workflow is set up to not fail on beta. -
e7defb3 (uncategorized) Remove bencher workflows by @joshka in #1719
These actions are currently unused as we haven't
invested the time necessary to understand how best
to use them. We can always re-add them later if we
find them useful. -
9398a25 (uncategorized) Add workflow_dispatch trigger for release-plz by @joshka in #1693
-
57c2326 (uncategorized) Run cargo-deny directly rather than via action by @joshka in #1621
Improves CI time
-
4a871f9 (uncategorized) Refactor xtask / toml formatting by @joshka in #1602
- format toml files using taplo
- add toml formatting check to CI
- use xtask consistently from bacon
- refactor xtask commands to take params instead of multiple commands
Reverted Commits
-
cace1e0 (release) Prepare for beta release by @orhun in #2117
This reverts commit 5ae224b so that
release-plzis being triggered again.See #2022 (comment)
for rationale.
