/cli-template-rs

cargo template for rust command line application

Primary LanguageRustApache License 2.0Apache-2.0

Cli Template for Rust

A simple template with cargo generate for quickly rewriting everything in rust. :^)

How to use?

Generate into a subfolder:

cargo generate --git https://github.com/oliverdding/cli-template-rs.git

Generate in the current folder:

cargo generate --init --git https://github.com/oliverdding/cli-template-rs.git

What does this template contains?

  • Layered configuration with config-rs
  • Command line argument parser and shell completions with clap
  • XDG support with directories
  • Logging and tracing with tracing
  • Return code error propagation with miette
  • Async runtime with graceful shutdown support with tokio