A lightweight task management and terminal rendering library inspired by tasuku, built with Rust and Tokio. Supports task state updates, hierarchical tasks, progressive rendering in TTY-enabled terminals, and plain text output in CI environments.
- Task States:
Pending,Loading,Success,Warning,Error - Terminal Rendering: Automatic detection of color support and CI environments
- Hierarchical Structure: Tasks can contain subtasks and status output
- Easy-to-use API: Define task workflows through async functions
Add this to your Cargo.toml:
[dependencies]
tasuku-rs = "0.1.0"See CHANGELOG.md for release notes and version history.
use tasuku::{Tasuku, TaskState};
#[tokio::main]
async fn main() {
let t = Tasuku::new();
let task = t.task("Example Task", |api| async move {
api.set_status(Some("Processing".to_string()));
tokio::time::sleep(std::time::Duration::from_millis(500)).await;
api.set_output("Output content");
}).await;
assert_eq!(task.state(), TaskState::Success);
}# Clone the repository
git clone https://github.com/Maidang1/tasuku-rs.git
cd tasuku-rs
# Build the project
cargo build
# Run examples
cargo run --example demotokio- Async runtimecrossterm- Terminal manipulationconsole- Terminal utilitiesfutures- Async utilitiesparking_lot- Synchronization primitivesonce_cell- Lazy static initialization
We use changesets to manage versioning and changelogs.
-
Make your code changes
-
Create a changeset describing your changes:
./scripts/add-changeset.sh
This will interactively prompt you for the type of change (patch/minor/major) and a description.
-
Commit both your code changes and the changeset file
-
Open a pull request
- patch - Bug fixes and minor changes (0.1.0 → 0.1.1)
- minor - New features (0.1.0 → 0.2.0)
- major - Breaking changes (0.1.0 → 1.0.0)
When changesets are merged to main:
- A GitHub Action automatically processes the changesets
- A version bump PR is created with updated
Cargo.tomlandCHANGELOG.md - After merging the version PR, a git tag is created
- The tag triggers automatic publishing to crates.io
For more details, see .changeset/README.md.
This project uses GitHub Actions for automatic publishing to crates.io. The publish workflow is triggered when version tags are created. See the publish workflow for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
Inspired by tasuku - A minimal task runner for Node.js