I've been programming in Rust for a few years now. I quite like the language, its tooling, and its library ecosystem. There's a few libraries ("crates") I especially like and use often. A short thread.

See https://blessed.rs/ for a list of "recommended crates" for a less personal list.

#Rust #RustLang

Crate List - Blessed.rs

clap is the command line argument parsing library. I especially like it because it lets me declare a struct, with strong Rust typing, to define what the command line should work like. I also like that meshes well with the tradition of Unix command line interfaces.

I've implemented command line parsing in C, shell, Python, and more. For a while the Python standard library had my implementation of getopt_long. clap is the only library for this that I actually enjoy using.

#Rust #RustLang

@liw Do you have an example of clap usage that you particularly like? (Otherwise, I'll just search for some random examples.)

@amenonsen I don't have anything I can easily point at, sorry. But maybe this blog post will do?

https://blog.liw.fi/posts/2023/clap/

Using clap to build nice command line interfaces

@liw @amenonsen Seems much like Python's click, or the "modern" Typer, which builds on it.
@jens @liw Thanks, I hadn't looked at either of those.