There are many excellent Rust libraries
(and also many poor ones of course).
These are all collected at
the Rust language-specific package repository.
For most programs, use of ecosystem library packages is a practical necessity.
Rust's excellent metaprogramming system makes it possible for libraries to provide facilities that resemble bespoke language features.
When searching for libraries,
usually use the opinionated catalogue at
Or use "recent downloads" for the search order on
which is inexact but is likely to give you fate-sharing
with the rest of the community, at least.
itertools. Superb collection of extra iterator combinators.
strum. Iterate over enum variants; enums to strings, etc.
easy-ext. Conveniently define methods on other people's types.
rayon: Semi-magical safe multicore parallelism as a drop-in replacement for std's serial iterators.
parking_lot. Alternatives to the standard mutex etc.
std's only in Rust 1.63 (August 2022).
bstr: Stringish methods on byte strings that are hopefully UTF-8 (but might not be).
bytemuck: Reinterpret-casting of plain data.
serde is a serialisation/deserialisation framework.
It defines a data model,
and provides automatic translation of ordinary Rust
to and from that model.
Ecosystem libraries provide concrete implementations for a wide variety of data formats, and some interesting data format metaprogramming tools.
The result is a superb capability to handle a wide variety of data marshalling problems. serde is especially good for ad-hoc data structures and structures whose definition is owned by a Rust project.
serde and its ecosystem are considerably better for many tasks than anything available in any other programming environment.
Generally, the resulting code is a fully monomorphised open-coded marshaller specialised for the specific data structure(s) and format(s), so performance is good but the code size can be very large.
Most Rust web tools are async.
Rust is well supplied with web frameworks, but it is hard to choose.
I have been using Rocket for some years, But development is rather slow - there still isn't a final release of
rocket 0.5. You should use the 0.5 preview.
axumis from the Tokio team, but quite new.
actix-webis very popular, but sometimes lacking attention to detail.
rouilleis sync. Yay! But I haven't tried it.
You should perhaps also consider:
If you are writing a command line program
you should probably use
It allows declarative definition of command line options.
clap has some problems.
Serious problems handling options which override each other. There is a facility for this but it is not convenient and its algorithm is fundamentally wrong.
General failure to follow (at least by default) well-established Unix option parsing conventions.
it is quite awkward even to provide a conventional pair of
In practice, using
means accepting that one's program will have
an imperfect and sometimes-balky command line syntax.
There are alternatives,
but they are much less popular and less well maintained.
I sometimes use
argparse where I want a fine-tuned option parser,
but it is quite odd and the docs are not great.