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

serde and the small ecosystem around it make it painless to serialize and deserialize structured data. I define a Rust type, annotate it with serde, and use serde-foo library to read and write files in format foo. I mostly use serde-json (for JSON) and serde-norway (for YAML) as those are the formats I mostly need.

#Rust #RustLang

@liw no way. no way the serde library for yaml is called norway.

for context, the "norway problem":
country_codes:

  • GB
  • FR
  • CH
  • NO

when loaded becomes ['GB', 'FR', 'CH', false]

crates.io: Rust Package Registry