![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [time](https://github.com/time-rs/time) from 0.3.37 to 0.3.39. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/time-rs/time/releases">time's releases</a>.</em></p> <blockquote> <h2>v0.3.39</h2> <p>See the <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog</a> for details.</p> <h2>v0.3.38</h2> <p>See the <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">changelog</a> for details.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/time-rs/time/blob/main/CHANGELOG.md">time's changelog</a>.</em></p> <blockquote> <h2>0.3.39 [2025-03-06]</h2> <h3>Fixed</h3> <ul> <li>Doc tests run successfully with the default feature set.</li> <li>wasm builds work again.</li> </ul> <p>Both of these were regressions in v0.3.38 and are now checked in CI.</p> <h2>0.3.38 [2025-03-05]</h2> <h3>Added</h3> <ul> <li> <p>The <code>[year]</code> component (in format descriptions) now supports a <code>range</code> modifier, which can be either <code>standard</code> or <code>extended</code>. The default is <code>extended</code> for backwards compatibility. This is intended as a manner to opt <em>out</em> of the extended range when the <code>large-dates</code> feature is enabled. When the <code>large-dates</code> feature is not enabled, the modifier has no effect.</p> </li> <li> <p><code>UtcDateTime</code>, which is semantically equivalent to an <code>OffsetDateTime</code> with UTC as its offset. The advantage is that it is the same size as a <code>PrimitiveDateTime</code> and has improved operability with well-known formats.</p> <p>As part of this, there were some other additions:</p> <ul> <li><code>utc_datetime!</code> macro, which is similar to the <code>datetime!</code> macro but constructs a <code>UtcDateTime</code>.</li> <li><code>PrimitiveDateTime::as_utc</code></li> <li><code>OffsetDateTime::to_utc</code></li> <li><code>OffsetDateTime::checked_to_utc</code></li> </ul> </li> <li> <p><code>time::serde::timestamp::milliseconds_i64</code>, which is a module to serialize/deserialize timestamps as the Unix timestamp. The pre-existing module does this as an <code>i128</code> where an <code>i64</code> would suffice. This new module should be preferred.</p> </li> </ul> <h3>Changed</h3> <ul> <li><code>error::Format</code> has had its <code>source()</code> implementation changed to no longer return a boxed value from the <code>ComponentRange</code> variant. If you were explicitly expecting this, you will need to update your code. The method API remains unchanged.</li> <li><code>[year repr:century]</code> supports single-digit values.</li> <li>All <code>format_into</code> methods accept <code>?Sized</code> references.</li> </ul> <h3>Miscellaneous</h3> <ul> <li>Some non-exhaustive enum variants that are no longer used have been modified to be statically proven as uninhabited. The relevant fields are doc-hidden and not semver-guaranteed to remain as such, though it is unlikely to change.</li> <li>An unnecessary check when parsing RFC 2822 has been removed.</li> <li>Various methods have had their implementations changed, resulting in significant performance gains. Among the methods changed are <ul> <li><code>util::is_leap_year</code></li> <li><code>util::weeks_in_year</code></li> <li><code>Month::length</code></li> <li><code>Date::to_calendar_date</code></li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="7949d2c2e8
"><code>7949d2c</code></a> v0.3.39 release</li> <li><a href="f51623b653
"><code>f51623b</code></a> Fix breakage from v0.3.38</li> <li><a href="1a31c0595b
"><code>1a31c05</code></a> v0.3.38 release</li> <li><a href="addf231ef5
"><code>addf231</code></a> Permit unsized writers for <code>format_into</code></li> <li><a href="338f84f545
"><code>338f84f</code></a> Allow clippy::ref_option lint for serde::format_description.</li> <li><a href="f8ecd81e8f
"><code>f8ecd81</code></a> feat: timestamp::milliseconds_i64 serializer</li> <li><a href="ce03bcab8f
"><code>ce03bca</code></a> Update Unicode license for cargo-audit</li> <li><a href="3d0b981381
"><code>3d0b981</code></a> Add parentheses for clarity</li> <li><a href="3096301eb3
"><code>3096301</code></a> Remove specific year from license</li> <li><a href="ec327a26db
"><code>ec327a2</code></a> Optimize Julian day calculations</li> <li>Additional commits viewable in <a href="https://github.com/time-rs/time/compare/v0.3.37...v0.3.39">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Table of Contents
Ratatui Website · Docs · Widget Examples · App Examples · Changelog
Breaking Changes · Contributing · Report a bug · Request a Feature
Ratatui (ˌræ.təˈtu.i) is a Rust crate for cooking up terminal user interfaces (TUIs). It provides a simple and flexible way to create text-based user interfaces in the terminal, which can be used for command-line applications, dashboards, and other interactive console programs.
Quickstart
Ratatui has templates available to help you get started quickly. You can use the
cargo-generate
command to create a new project with Ratatui:
cargo install --locked cargo-generate
cargo generate ratatui/templates
Selecting the Hello World template produces the following application:
use color_eyre::Result;
use crossterm::event::{self, Event};
use ratatui::{DefaultTerminal, Frame};
fn main() -> Result<()> {
color_eyre::install()?;
let terminal = ratatui::init();
let result = run(terminal);
ratatui::restore();
result
}
fn run(mut terminal: DefaultTerminal) -> Result<()> {
loop {
terminal.draw(render)?;
if matches!(event::read()?, Event::Key(_)) {
break Ok(());
}
}
}
fn render(frame: &mut Frame) {
frame.render_widget("hello world", frame.area());
}
Documentation
- Docs - the full API documentation for the library on docs.rs.
- Ratatui Website - explains the library's concepts and provides step-by-step tutorials.
- Ratatui Forum - a place to ask questions and discuss the library.
- Widget Examples - a collection of examples that demonstrate how to use the library.
- App Examples - a collection of more complex examples that demonstrate how to build apps.
- Changelog - generated by git-cliff utilizing Conventional Commits.
- Breaking Changes - a list of breaking changes in the library.
You can also watch the EuroRust 2024 talk to learn about common concepts in Ratatui and what's possible to build with it.
Templates
If you're looking to get started quickly, you can use one of the available templates from the
templates repository using cargo-generate
:
cargo generate ratatui/templates
Built with Ratatui
Check out the showcase section of the website, or the awesome-ratatui repository for a curated list of awesome apps and libraries built with Ratatui!
Alternatives
Contributing
Feel free to join our Discord server for discussions and questions! There is also a Matrix bridge available at #ratatui:matrix.org. We have also recently launched the Ratatui Forum.
We rely on GitHub for bugs and feature requests.
Please make sure you read the contributing guidelines before creating a pull request.
Acknowledgements
Ratatui was forked from the tui-rs crate in 2023 in order to continue its development. None of this could be possible without Florian Dehau who originally created tui-rs which inspired many Rust TUIs.
Special thanks to Pavel Fomchenkov for his work in designing an awesome logo for the Ratatui project and organization.
License
This project is licensed under the MIT License.