Why Rust for CLI tools?
Rust gives you the performance of C with the safety of a modern language. For CLI tools, this means instant startup times and zero runtime dependencies — your users just download a single binary and run it.
Setting up the project
Start with cargo init my-tool. Add clap for argument parsing and anyhow for error handling. These two crates cover 90% of what a CLI needs.
Cross-platform builds
Use GitHub Actions with cross to compile for Linux, macOS, and Windows from a single workflow. Ship the binaries as GitHub Release assets.