Web Frameworks
- hyper is the de facto and certainly more proven HTTP library in Rust. It is low level
- actix-web was the rising star, designed for absolute speed and was one of the first web frameworks to adopt async/await . Unfortunately, its history is tainted by some drama, where the original creator decided to leave.
- warp is a web framework built on top of hyper, made by the same author. It is small, and reliable, and fast enough for 99% of projects. There is one downside: its API is just plain weird.
- axum is the new kid in town. Developed by tokio’s team which is a very strong signal of quality, it provides a very clean API and a rich ecosystem thanks to tower-http. Like warp, axum is built on top of hyper which make it very reliable.
- tide is an elegant web framework available. Unfortunately, it relies on the async-std runtime, and thus can’t be used iwth Tokio Runtime
- gotham built on top of hyper but seems to provide a better API than warp but is stilla young project
Warp
Its API is elegant in terms of functional programming, as being extremely composable using Filters, but it does absolutely not match the mental model of traditional web framework (request, server, context)
Web clients
Popular solutions are reqwest, awc (Actix web client), ureq, surf
Database access
The 3 main contenders for the database access layer are:
- diesel, which is an ORM which is an abstraction layer that can be sometimes be clunky, and is also sync
- tokio-postgres is async but low level, and require the user to take care of deserialization
- sqlx provides async API, type safety and even a way to check the queries against the schema of the database at compile time using
query!macro
Cryptography
- sodiumoxide is a Rust wrapper for libsodium, the renowned C cryptography library recommended and applied from most cryptographers. The maintainer of libsodium has stepped down
- ring focuses on exposing easy-to-use and hard to misuses API, however it doesn’t contain all algorithms, such as
XChaCha20-Poly1305. It is externally audited - dalek-cryptography is a Github organization that regroup multiple packages written purely in Rust, used by organizations that are serious about cryptography such as Signal and Diem
- Rust Crypto contains allthe crypto primitives you need, but is not externally audited
- [rustls](GitHub - rustls/rustls: A modern TLS library in Rust](https://github.com/ctz/rustls) is a replacement for OpenSSL, written in Rust. It is externally audited
Other
- single instance allow to run an application only once
- cross provides cross compiling without touching the system installation, i.e. it provides a series of builder images that it downloads with the right configuration. Requires docker or podman.