A template for bootstrapping a Rust TUI application with tui-rs & crossterm

Overview

rust-tui-template

A template for bootstrapping a Rust TUI application with tui-rs & crossterm.

tui-rs

The library is based on the principle of immediate rendering with intermediate buffers. This means that at each new frame you should build all widgets that are supposed to be part of the UI. While providing a great flexibility for rich and interactive UI, this may introduce overhead for highly dynamic content. So, the implementation try to minimize the number of ansi escapes sequences generated to draw the updated UI. In practice, given the speed of Rust the overhead rather comes from the terminal emulator than the library itself.

Documentation

crossterm

Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform text-based interfaces (see features). It supports all UNIX and Windows terminals down to Windows 7 (not all terminals are tested, see Tested Terminals for more info).

Documentation

Structure

src/
├── app.rs     -> holds the states and renders the widgets
├── event.rs   -> handles the terminal events (key press, mouse click, resize, etc.)
├── handler.rs -> handles the key press events and updates the application
├── lib.rs     -> module definitions
├── main.rs    -> entry-point
└── tui.rs     -> initializes/exits the terminal interface

Usage

  1. Install cargo-generate
cargo install cargo-generate
  1. Clone this repository via cargo-generate:
cargo generate --git https://github.com/orhun/rust-tui-template --name <project-name>

See also

You might also like...
Simple template to use csr and ssr leptos with tauri for ios/android/windows/macos/linux and web dev

Tailwind-Leptos-Tauri Template Simple template to use csr and ssr leptos with tauri for ios/android/windows/macos/linux and web dev Just clone the rep

Rust TUI client for steamcmd
Rust TUI client for steamcmd

Steam TUI About Just a simple TUI client for steamcmd. Allows for the graphical launching, updating, and downloading of steam games through a simple t

Another TUI based system monitor, this time in Rust!
Another TUI based system monitor, this time in Rust!

Another TUI based system monitor, this time in Rust!

A user-friendly TUI client for Matrix written in Rust!

Konoha A user-friendly TUI client for Matrix written in Rust! Notice: The client is currently not usable and is only hosted on GitHub for version cont

A tui to test regexes on the rust regex crate

regex-tui Structure src/ ├── app.rs - holds the states and renders the widgets ├── event.rs - handles the terminal events (key press, mouse cl

Lemurs - A lightweight TUI display/login manager written in Rust 🐒
Lemurs - A lightweight TUI display/login manager written in Rust 🐒

Lemurs 🐒 A TUI Display/Login Manager written in Rust WIP: Whilst the project is working and installable, there are still a lot of bugs and limitation

Playground for 2D EKF-SLAM as TUI in Rust

SLAMme.RS Playground for 2D EKF-SLAM as TUI in Rust Installation $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install RUST $ su

Rust TUI library - Clipping region is a set of min/max x/y values applied to the existing region

TinyBit Clipping region is a set of min/max x/y values applied to the existing region A TUI lib This is not yet production ready T O D O TODO: bugs: T

An easy-to-use TUI crate for Rust, based off of the Elm architecture.

Rustea An easy-to-use TUI crate for Rust, based off of the Elm architecture. This is a re-implementation of Go's Tea, created by TJ Holowaychuk. Featu

Owner
Orhun Parmaksız
FOSS developer, @archlinux packager, oxidizing things with @rust-lang
Orhun Parmaksız
Rust API Server: A versatile template for building RESTful interfaces, designed for simplicity in setup and configuration using the Rust programming language.

RUST API SERVER Introduction Welcome to the Rust API Server! This server provides a simple REST interface for your applications. This README will guid

Harry Nguyen 3 Feb 25, 2024
Basic template for an out-of-tree Linux kernel module written in Rust.

Rust out-of-tree module This is a basic template for an out-of-tree Linux kernel module written in Rust. Please note that: The Rust support is experim

Rust for Linux 118 Dec 26, 2022
A Rust CLI template on Gitpod

This is a Rust CLI template configured for ephemeral development environments on Gitpod.

Oliver Gibbs 2 Jan 14, 2022
Latex template handler using Rust

Latex template handler using Rust All the templates used by this program are stored in another GitHub repository. Dependencies rust & cargo How to use

Johan Rodríguez 2 Oct 19, 2022
A Nix template for full-stack web apps in Rust using Leptos

leptos-fullstack A Nix template for full-stack web apps in Rust using Leptos. Tech used: Leptos full-stack framework server functions ssr + hydration

Sridhar Ratnakumar 6 Aug 4, 2023
Self-contained template system with Handlebars and inline shell scripts

Handlematters Self-contained template system with Handlebars and inline shell scripts Introduction Handlematters is a template system that combines Ha

Keita Urashima 3 Sep 9, 2022
A template with cookie cutter CLI, Program and Integration tests for Solana blockchain

About solana-cli-program template is a sample app demonstrating the creation of a minimal CLI application written in Rust to interact with Solana and

null 46 Nov 3, 2022
A command line tool for easily generating multiple versions of a configuration file from a single template

MultiConf A command line tool for easily generating multiple versions of a configuration file from a single template. Why? I'm a big fan of the i3 win

Ian Clarke 4 Dec 10, 2022
A template for starting a dioxus project to be used with dioxus-cli

A template for starting a dioxus project to be used with dioxus-cli

Dioxus 6 Nov 25, 2022
BoilerFiles is a CLI for downloading your boilerplate files from a public GitHub template repo.

BoilerFiles Available on crates.io. BoilerFiles is a CLI for downloading your boilerplate files from a public GitHub template repo. Features Are you t

Jan Müller 4 Oct 1, 2022