Fork me on GitHub

What is

The standard library in Rust is much smaller than in Python or Go, for example. Those languages come with "batteries included" support for things like HTTP(S), JSON, timezones, random numbers, and async IO. Rust, on the other hand, gets things like that from the ecosystem and the Cargo package manager. But with almost 100 thousand crates to choose from, a common complaint from new Rust developers is that they don't know where to start, which crates they ought to use, and which crates they ought to trust. This list attempts to answer those questions.

See also which takes a more automated approach (ordering crates by number of downloads) and also has an excellent search function.


Developer tools for working with Rust projects.

Use Case Recommended Crates
Toolchain Management

Install, manage, and upgrade versions of rustc, cargo, clippy, rustfmt and more.


The official Rust linter.

Code Formatting

The official Rust code formatter.

Cross Compilation

Seamless cross-compiling using Docker containers.

Managing Dependencies

Adds 'cargo add', 'cargo rm', and 'cargo upgrade' commands to cargo

Finds dependencies that have available updates

Check dependencies for reported security vulnerabilities

Lists licenses of all dependencies

Enforce policies on your code and dependencies.


Faster, better test runner


criterion [docs]
Statistically accurate benchmarking tool for benchmarking libraries

Tool for benchmarking compiled binaries (similar to unix time command but better)


Execution flamegraph generation

dhat [docs]
Heap memory profiling

cargo-show-asm [docs]
Printed the generated assembly for a Rust function

Debugging Macros

Allows you to inspect the code that macros expand to

Release Automation

Helper for publishing new crate versions.

Continuous Integration

rust-toolchain (github action)
Github action to install Rust components via rustup

rust-cache (github action)
Github action to cache compilation artifacts and speed up subsequent runs.


Very commonly used crates that everyone should know about


General purpose

Use Case Recommended Crates
Random numbers

rand [docs]
De facto standard random number generation library split out from the standard library

Time & Date

Unfortunately there is no clear answer as to which is best between time and chrono.
Evaluate for yourself between these two, but be resassured that both are trusted and well-maintained.

time [docs]
A smaller, simpler library. Preferrable if covers your needs, but it's quite limited in what it provides.

chrono [docs]
The most comphrehensive and full-featured datetime library, but more complex because of it.

Serialization (JSON, YAML, etc)

See here for supported formats.

serde [docs]
De facto standard serialization library. Use in conjunction with sub-crates like serde_json for the specific format that you are using.

Regular Expressions

regex [docs]
De facto standard regex library. Very fast, but does not support fancier features such as backtracking.

fancy_regex [docs]
Use if need features such as backtracking which regex doesn't support


uuid [docs]
Implements generating and parsing UUIDs and a number of utility functions

Temporary files

tempfile [docs]
Supports both temporary files and temporary directories

Gzip (de)compression

flate2 [docs]
Uses a pure-Rust implementation by default. Use feature flags to opt in to system zlib.

Insertion-ordered map

indexmap [docs]
A HashMap that seperately keeps track of insertion order and allows you to efficiently iterate over its elements in that order

Stack-allocated arrays

arrayvec [docs]
Arrays that are ONLY stack-allocated with fixed capacity

smallvec [docs]
Arrays that are stack-allocated with fallback to the heap if the fixed stack capacity is exceeded

tinyvec [docs]
Stack allocated arrays in 100% safe Rust code but requires items to implement the Default trait.

HTTP Requests

reqwest [docs]
Full-fat HTTP client. Can be used in both synchronous and asynchronous code. Requires tokio runtime.

ureq [docs]
Minimal synchronous HTTP client focussed on simplicity and minimising dependencies.

Error Handling

Crates for more easily handling errors

Use Case Recommended Crates
For applications

anyhow [docs]
Provides a boxed error type that can hold any error, and helpers for generating an application-level stack trace.

color-eyre [docs]
A fork of anyhow that gives you more control over the format of the generated error messages. Recommended if you need intend to present error messages to end users. Otherwise anyhow is simpler.

For libraries

See also: Designing error types in Rust

thiserror [docs]
Helps with generating boilerplate for enum-style error types.


Crates for logging. Note that in general you will need a seperate crate for actually printing/storing the logs

Use Case Recommended Crates
Text-based logging

tracing [docs]
Tracing is now the go-to crate for logging.

log [docs]
An older and simpler crate if your needs are simple and you are not using any async code.

Structured logging

tracing [docs]
Tracing is now the go-to crate for logging.

slog [docs]
Structured logging

Language Extensions

General purpose utility crates that extend language and/or stdlib functionality.

Use Case Recommended Crates
Lazy static variable initialization

once_cell [docs]
Newer crate with more ergonomic API. On track to be incorporated into the standard library. Should be preferred for all new projects.

lazy_static [docs]
Older crate. API is less convenient, but crate is stable and maintained.

Iterator helpers

itertools [docs]
A bunch of useful methods on iterators that aren't in the stdlib

Macro helpers

syn [docs]
Parse rust source code

quote [docs]
Quasi quoting rust (useful for interpolating generated code with literal code)

paste [docs]
Concatenating and manipulating identifiers

Abstracting over different number types

num [docs]
Traits like Number, Add, etc that allow you write functions that are generic over the specific numeric type

Safe type casts

bytemuck [docs]


bitflags [docs]
Strongly typed bitflag types


For low-level interaction with the underling platform / operating system

Use Case Recommended Crates
Memory mapping files

memmap2 [docs]
The older memmap crate is unmaintained.


libc [docs]
Bindings for directly calling libc functions.

Windows (OS)

windows [docs]
The official Microsoft-provided crate for interacting with windows APIs

winapi [docs]
Older binding to the windows APIs. Unofficial, but more complete than windows-rs

*nix (OSs)

nix [docs]
Bindings to the various *nix system functions. (Unix, Linux, MacOS, etc.)

FFI / Interop

Crates that allow Rust to interact with code written in other languages.

Use Case Recommended Crates

bindgen [docs]
Generate Rust bindings to C libraries

cbindgen [docs]
Generate C bindings to Rust libraries


cxx [docs]
Safe C++ <-> Rust interop by generating code for both sides.


pyo3 [docs]
Supports both calling python code from Rust and exposing Rust code to Python


napi [docs]
is a framework for building pre-compiled Node.js addons in Rust.

neon [docs]
Slower than napi, but also widely used and well-maintained


rutie [docs]
Supports both embedding Rust into Ruby applications and embedding Ruby into Rust applications


objc [docs]
Interop with the Objective-C runtime


jni [docs]
Implement Java methods for JVM and Android in Rust. Call Java code from Rust. Embed JVM in Rust applications.


mlua [docs]
Bindings to Lua 5.4, 5.3, 5.2, 5.1 (including LuaJIT)


flutter_rust_bridge [docs]
Works with Dart with or without Flutter


rustler [docs]
Safe Rust bridge for creating Erlang NIF functions


Crates that provide implementations of cryptographic algorithms. This section attempts to list the best crates for the listed algorithms, but does not intend to make recommendations for the algorithms themselves.

Use Case Recommended Crates
Password Hashing

For more algorithms, see Rust Crypto Password Hashes.

argon2 [docs]

scrypt [docs]

bcrypt [docs]

General Purpose Hashing

For more algorithms, see Rust Crypto Hashes.

sha2 [docs]

sha1 [docs]

md-5 [docs]

AEAD Encryption

For more algorithms, see Rust Crypto AEADs.

aes-gcm-siv [docs]

aes-gcm [docs]

chacha20poly1305 [docs]


rsa [docs]

Digital Signatures

For more algorithms, see Rust Crypto Signatures.

ed25519 [docs]
Use in conjunction with the ed25519-dalek crate.

ecdsa [docs]

dsa [docs]

Certificate Formats

For more formats, see Rust Crypto Formats.

der [docs]

pem‑rfc7468 [docs]

pkcs8 [docs]

x509-cert [docs]


rustls [docs]
A portable pure-rust high-level implementation of TLS. Implements TLS 1.2 and higher.

native-tls [docs]
Delegates to the system TLS implementations on windows and macOS, and uses OpenSSL on linux.

See also (click to open)

webpki [docs]
X.509 Certificate validation. Builds on top of ring.

ring [docs]
Fork of BoringSSL. Provides low-level cryptographic primitives for TLS/SSL


subtle [docs]
Utilities for writing constant-time algorithms

zeroize [docs]
Securely erase memory


TCP, HTTP, GRPc, etc. And the executors required to do asynchronous networking.

Async Foundations

To do async programming using the async-await in Rust you need a runtime to execute drive your Futures.

Use Case Recommended Crates
General Purpose Async Executors

tokio [docs]
The oldest async runtime in the Rust ecosystem and still the most widely supported. Recommended for new projects.

futures-executor [docs]
A minimal executor. In particular, the block_on function is useful if you want to run an async function synchronously in codebase that is mostly synchronous.

See also (click to open)

async-std [docs]
A newer option that is very similar to tokio. Its API more closely mirrors the std library, but it doesn't have as much traction or ecosystem support as Tokio.

Async Utilities

futures [docs]
Utility functions for working with Futures and Streams

async-trait [docs]
Provides a workaround for the lack of language support for async functions in traits


glommio [docs]
Use if you need io_uring support. Still somewhat experimental but rapidly maturing.


HTTP client and server libraries, as well as lower-level building blocks.

Use Case Recommended Crates
Types & Interfaces

http [docs]
The `http` crate doesn't actually contain an HTTP implementation. Just types and interfaces to help interoperability.

Low-level HTTP Implementation

hyper [docs]
A low-level HTTP implementation (both client and server). Implements HTTP 1, 2, and 3. Works best with the tokio async runtime, but can support other runtimes.

HTTP Client

reqwest [docs]
Full-fat HTTP client. Can be used in both synchronous and asynchronous code. Requires tokio runtime.

ureq [docs]
Minimal synchronous HTTP client focussed on simplicity and minimising dependencies.

See also (click to open)

surf [docs]
Client that uses the async-std runtime rather than the tokio runtime. Not well maintained.

HTTP Server

axum [docs]
A minimal and ergonomic framework. An official part of the tokio project. Recommend for most new projects.

actix-web [docs]
A performance focussed framework. All Rust frameworks are fast, but choose actix-web if you need the absolutely maximum performance.

See also (click to open)

rocket [docs]
Has an excellent API and a solid implementation. However development has been intermittent, and the async branch still doesn't have a stable release. Use of rocket is not recommended until this has been fixed.

poem [docs]
Automatically generates OpenAPI defintions.

warp [docs]
Very similar to axum but with a quirkier API. This is a solid framework, but you should probably prefer Axum unless you particularly like the API

tide [docs]
Similar to Axum, but based on async-std rather than tokio

GraphQL Server

async-graphql [docs]
A high-performance graphql server library that's fully specification compliant. Integrates with actix-web, axum, poem, rocket, tide, warp.


This section includes libraries for you to use just websockets. However note that many of the HTTP server frameworks in the section above also support websockets

Use Case Recommended Crates

tungstenite [docs]
Low-level crate that others build on

General Purpose

tokio-tungstenite [docs]
If you are using the tokio executor

async-tungstenite [docs]
If you are using the async-std executor


Use Case Recommended Crates
General Purpose

tonic [docs]
gRPC over HTTP/2 with full support for asynchronous code. Works with tokio


SQL Databases

Use Case Recommended Crates
Multi Database

sqlx [docs]
Works with Postgres, MySQL, SQLite, and MS SQL.
Supports compile time checking of queries. Async: supports both tokio and async-std.


sea-orm [docs]
Recommended. Built on top of sqlx. There is also a related sea-query crate that provides a query builder without full ORM functionality.

diesel [docs]
Stable release is sync only. Pre-release async branch is currently AGPL. Can provide better performance in some circumstances.


sqlx [docs]

tokio-postgres [docs]
Postgres-specific library. Performs better than SQLx


sqlx [docs]

mysql_async [docs]
Has a poorly designed API. Prefer SQLx for MySQL


sqlx [docs]

rusqlite [docs]
Provides a sync API to SQLite + provides access to advanced sqlite features.


sqlx [docs]

tiberius [docs]
MS SQL specific library. Has better support for advanced column types than SQLx.


oracle [docs]
Rust bindings to ODPI-C

Other Databases

Use Case Recommended Crates

redis [docs]


mongodb [docs]


elasticsearch [docs]

Rocks DB

rocksdb [docs]


Use Case Recommended Crates
Connection pool

deadpool [docs]
A dead simple async pool for connections and objects of any type.


Argument Parsing

See argparse-benchmarks-rs for a full comparison of the crates mentioned here and more.

Use Case Recommended Crates

clap [docs]
Ergonomic, battle-tested, includes the kitchen sink, and is fast at runtime. However compile times can be slow

See also (click to open)

bpaf [docs]
Fast compile times than clap while still being featureful. But still has some rough edges, and the API can be confusing at times.


lexopt [docs]
Fast compile times, fast runtime, pedantic about correctness. API is less ergonomic

pico-args [docs]
Fast compile times, fast runtime, more lax about correctness. API is more ergonomic


Helpers that are often useful when implementing CLIs

Use Case Recommended Crates

globset [docs]
High-performance globbing that allows multiple globs to be evaluated at once

Directory walking

walkdir [docs]
Basic recursive filesystem walking.

ignore [docs]
Recursive filesystem walking that respects ignore files (like .gitignore)

Filesystem helpers

fs_extra [docs]
Recursively move, copy, and delete the files in a directory

File watching

notify [docs]
Watch files or directories and execute a function when they change

Terminal Rendering

For fancy terminal rendering and TUIs. The crates recommended here work cross-platform (including windows).

Use Case Recommended Crates
Coloured Output

termcolor [docs]
Cross-platform terminal colour output

Progress indicators

indicatif [docs]
Progress bars and spinners

Full TUI library

crossterm [docs]
Cross-platform terminal rendering and event handling


Data Structures

Use Case Recommended Crates

parking_lot [docs]
std::mutex also works fine. But Parking Lot is faster.

Atomic pointer swapping

arc-swap [docs]
Useful for sharing data that has many readers but few writers

Concurrent HashMap

See conc-map-bench for comparative benchmarks of concurrent HashMaps.

dashmap [docs]
The fastest for general purpose workloads

flurry [docs]
Particularly good for read-heavy workloads.


See communicating-between-sync-and-async-code for notes on when to use async-specific channels vs general purpose channels.

crossbeam_channel [docs]
The absolute fastest channel implementation available. Implements Go-like 'select' feature.

flume [docs]
Smaller and simpler than crossbeam_channel and almost as fast

postage [docs]
Channels that integrate nicely with async code

Parallel computation

rayon [docs]
Convert sequential computation into parallel computation with one call - `par_iter` instead of `iter`



GTK and Tauri are probably the only options which can be described as production-ready without caveats.
The Rust native options are usable for simple projects but are all still quite incomplete.

Use Case Recommended Crates

gtk4 [docs]
Rust bindings to GTK4. These are quite well supported, although you'll often need to use the C documentation.

relm4 [docs]
A higher-level library that sits on top of gtk4-rs

Web-based GUI

tauri [docs]
Electron-like web-based UI. Except it uses system webviews rather than shipping chromium, and non-UI code is written in Rust rather than node.js

Rust Native GUI

iced [docs]
Retained mode UI with a nice API. It's useable for basic apps, but has a number of missing features including multiple windows, layers, and proper text rendering.

egui [docs]
Immediate-mode UI. Lots of widgets. The most useable out of the box if your needs are simple and you don't need to customise of the look and feel

druid [docs]
Has better foundations than iced or egui, but the API is quite clunky and poorly documented.

slint [docs]
The most complete rust-native UI library. But note that it's dual GPL3/commercial licensed.

File Dialogs

rfd [docs]
Platform-native open/save file dialogs. Can be used in conjunction with other UI libraries.

Game Development

Use Case Recommended Crates
Game Engines

bevy [docs]
By far the most developed Rust game engine. It's still early, but already impressive and very much useable.

ggez [docs]
A simpler option for 2d games only.

3D Math

glam [docs]
Fast math library optimised for game development use cases