Rain's Rust CLI recommendations

Overview

Rain's Rust CLI recommendations

This living document comprises my recommendations for how to organize and manage Rust CLI applications.

In this document, I cover some tips and best practices for writing Rust applications, informed by my experience writing real-world Rust tools. I've focused on command-line tools here, but many of the suggestions can be generalized to graphical and server applications as well. I hope you find them useful for your own applications.

If you haven't gone through the Rust CLI Book yet, I'd recommend reading it first. That book provides a lot of useful information about how to write command-line apps in Rust. This document covers some more advanced material and is more opinionated overall.

Locations

This document is hosted online at https://rust-cli-recommendations.sunshowers.io. The source is hosted on GitHub.

This document is available offline by installing git and running the following command while online.

git clone https://github.com/sunshowers-code/rust-cli-recommendations --branch gh-pages

then pointing your web browser at rust-cli-recommendations/index.html.

Pull requests to fix typos or unclear language are welcome! If you have a suggestion for a change to the document, please search through the issues to see if it's been discussed already. If not, please open an issue.

Tip: While reading the book, you can hit the edit button in the top right corner to make a quick change to it.

License

This document, other than inline code snippets, is licensed under CC BY 4.0. This means that you are welcome to share, adapt or modify this material as long as you give appropriate credit.

Code snippets included in this document are licensed under CC0 1.0. The author(s) have waived all of their rights to the work worldwide under copyright law, to the extent allowed by law.

You might also like...
Real-time CLI level meter built in Rust.
Real-time CLI level meter built in Rust.

Meter This is a very simple command line utility written in Rust for measuring the gain of a microphone. It displays the values in dBFS. This is usefu

A lightweight and super fast cli todo program written in rust under 200 sloc
A lightweight and super fast cli todo program written in rust under 200 sloc

todo A lightweight and super fast cli todo program written in rust under 200 sloc installation AUR package: todo-bin use cargo build --release to comp

Baby's first Rust CLI project. Basic implementation of grep. Written in about 100 SLOC.

minigrep Coding project from Chapter 12 of the The Rust Programming Language book. Usage Compile and run as so minigrep QUERY FILENAME QUERY being the

Simple cli clipboard manager written in rust

Simple cli clipboard manager written in rust

A cli based pastebin in Rust, but very insecure

pasta A cli based pastebin in Rust, but very insecure Use nightly toolchain to build rustup override set nightly When this program is running, you can

A trash-cli copy, but this time in Rust.

trash-rs A trash-cli copy, but this time in Rust. TODO Deletion Relative paths * functionality List files Include in Metadata: Original directory Date

A CLI salah time written in Rust
A CLI salah time written in Rust

Bilal bilal is a CLI salah time. Features Show all salah time in current day Show current salah time and its remaining time Show next salah time Usage

Cli tool for git productivity written in Rust and packaged for consumption via NPM
Cli tool for git productivity written in Rust and packaged for consumption via NPM

crust 🍞 cli tool for git productivity written in Rust and packaged for consumption via NPM This repo is identical with @skyneticist/golee in terms of

A Rust CLI that makes mechanical keyboard sound effects on every key press
A Rust CLI that makes mechanical keyboard sound effects on every key press

Rustyvibes A Rust CLI that makes mechanical keyboard sound effects on every key press Rustyvibes.mp4 Installation macOS: brew install kb24x7/rustyvibe

Comments
  • Fix markdown issues

    Fix markdown issues

    Found via markdownlint -f --disable MD004 MD013 MD033 MD036 MD042 -- **/*.md

    See a detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md

    opened by kianmeng 2
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
Quickly build cool CLI apps in Rust.

QuiCLI Quickly build cool CLI apps in Rust. Getting started Read the Getting Started guide! Thanks This is only possible because of all the awesome li

Pascal Hertleif 538 Dec 5, 2022
A minimal CLI framework written in Rust

seahorse A minimal CLI framework written in Rust Features Easy to use No dependencies Typed flags(Bool, String, Int, Float) Documentation Here Usage T

Keisuke Toyota 223 Dec 30, 2022
A CLI tool that allow you to create a temporary new rust project using cargo with already installed dependencies

cargo-temp A CLI tool that allow you to create a new rust project in a temporary directory with already installed dependencies. Install Requires Rust

Yohan Boogaert 61 Oct 31, 2022
A simple CLI pomodoro timer written in Rust.

Pomodoro A simple CLI pomodoro timer written in Rust. Based on the Pomodoro Technique. Works on any platform that supports desktop notifications. Exam

null 6 Nov 26, 2021
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
Tiny Rust CLI to checkout a recent git branch interactively

git-select-branch Tiny Rust CLI to checkout a recent git branch interactively. Installation Homebrew brew tap dnjstrom/git-select-branch brew install

Daniel Ström 5 Oct 11, 2022
Mini Rust CLI to deploy sites to Netlify using their API

This is a Rust CLI that uses the Netlify API to deploy sites.

Benjamin Lannon 10 May 12, 2022
An feature packed Google Tasks CLI written purely in Rust

rChore A feature packed unofficial Google Tasks CLI to boost your producitvity, written purely in Rust. ?? What is rChore? rChore is an unofficial Goo

Hemanth Krishna 41 Dec 24, 2022
Run your Rust CLI programs as state machines with persistence and recovery abilities

step-machine Run your CLI programs as state machines with persistence and recovery abilities. When such a program breaks you'll have opportunity to ch

Imbolc 31 Nov 23, 2022