Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bump r3bl_tuify from 0.1.27 to 0.2.0 #8569

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 23, 2024

Bumps r3bl_tuify from 0.1.27 to 0.2.0.

Release notes

Sourced from r3bl_tuify's releases.

r3bl_terminal_async v0.3.0

Build interactive and non blocking CLI apps with ease in Rust

The r3bl_terminal_async library lets your CLI program be asynchronous and interactive without blocking the main thread. Your spawned tasks can use it to concurrently write to the display output, pause and resume it. You can also display of colorful animated spinners ⌛🌈 for long running tasks. With it, you can create beautiful, powerful, and interactive REPLs (read execute print loops) with ease.

Why use this crate

  • Because read_line() is blocking. And there is no way to terminate an OS thread that is blocking in Rust. To do this you have to exit the process (who’s thread is blocked in read_line()).
  • Another annoyance is that when a thread is blocked in read_line(), and you have to display output to stdout concurrently, this poses some challenges.

Demo of this in action

Here's a screen capture of the types of interactive REPLs that you can expect to build in Rust, using this crate.

A couple of things to note about this demo:

  1. You can use up, down to access history in the multi-line editor.
  2. You can use left, right, ctrl+left, ctrl+right, to jump around in the multi-line editor.
  3. You can edit content in this multi-line editor without blocking the main thread, and while other tasks (started via tokio::spawn are concurrently producing output to the display.
  4. You can pause the output while spinners are being displayed, and these spinners support many different kinds of animations!

Example of using this crate

There are great examples in the examples folder of the repo here. Let's walk through a simple example of using this crate. Let's create a new example using the following commands:

cargo new --bin async-cli
cd async-cli
cargo add r3bl_terminal_async
cargo add miette --features fancy
cargo add tokio --features full

Now, let's add a main.rs file in the src folder.

use std::time::Duration;
use r3bl_terminal_async::{tracing_setup, TerminalAsync, TracingConfig};
use tokio::time::interval;
#[tokio::main]
async fn main() -> miette::Result<()> {
let maybe_terminal_async = TerminalAsync::try_new("> ").await?;
// If the terminal is not fully interactive, then return early.
let mut terminal_async = match maybe_terminal_async {
    None =&gt; return Ok(()),
    _ =&gt; maybe_terminal_async.unwrap(),

</tr></table>

... (truncated)

Changelog

Sourced from r3bl_tuify's changelog.

v0.2.0 (2024-10-21)

This is part of a total reorganization of the r3bl-open-core repo. This is a breaking change for almost every crate in the repo. This PR contains all the changes.

  • Updated:

    • This release just uses the latest deps from r3bl-open-core repo, since so many crates have been reorganized and renamed. The functionality has not changed at all, just the imports.
  • Removed:

    • Move some of term.rs into:
      • r3bl_core - The functions to get the terminal window size and width.
      • r3bl_ansi_color - The functions to detect whether the current process is running in an interactive TTY or not.
Commits

Dependabot compatibility score

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 commands and options

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)

@dependabot dependabot bot requested a review from a team as a code owner October 23, 2024 18:44
@dependabot dependabot bot force-pushed the dependabot/cargo/r3bl_tuify-0.2.0 branch 8 times, most recently from 2ca26cb to 4ac977d Compare October 29, 2024 19:24
@dependabot dependabot bot force-pushed the dependabot/cargo/r3bl_tuify-0.2.0 branch from 4ac977d to b3a5c94 Compare October 31, 2024 11:51
Bumps [r3bl_tuify](https://github.com/r3bl-org/r3bl-open-core) from 0.1.27 to 0.2.0.
- [Release notes](https://github.com/r3bl-org/r3bl-open-core/releases)
- [Changelog](https://github.com/r3bl-org/r3bl-open-core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/r3bl-org/r3bl-open-core/commits)

---
updated-dependencies:
- dependency-name: r3bl_tuify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/r3bl_tuify-0.2.0 branch from b3a5c94 to 2a200d9 Compare November 5, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants