Member-only story
Rust Fundamental Libraries Worth Trying
#1 clap
Building CLI
tools in Rust
is a natural fit - just look at ripgrep
and Rust
's own Cargo
. Superfast startup times, small binary sizes, input safe code, runtime safe binaries, cross compiling
to just about any architecture you might want.To start building CLI
tools, clap
is a great CLI
library, and it's so good that I don't see any reason to have alternatives that are common in a dozen other languages. In fact, if you want to try Rust
, I suggest you take a look at rustup
and try this library to see what it can bring you.
https://docs.rs/clap/latest/clap/
#2 serde
Like clap
, serde
is a feature-rich, high-performance general-purpose serialization library. In fact, thinking about Java
and .net
, I can't remember a serialization library that does so well in all aspects - ergonomics and performance.Instead of trying to read and write files yourself, write the datatypes first and let serde
do all the work. As a bonus, you can mix and match data formats ( YAML, JSON
) after all operations are done.
#3 reqwest
Reqwest
follows the gold standard of HTTP
Client libraries such as request
, superagent
and requests
and applies them perfectly to Rust
. It's my go-to library for HTTP
Clients and is fully featured.