Which Rust web framework to choose in 2022 (with code examples)

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Rocket

    A web framework for Rust.

  • Agree, but takes some getting used to. The actor system can feel like magic at the beginning. Sometimes it can be easier on devs to use something like https://rocket.rs/

  • examples

    Community showcase and examples of Actix ecosystem usage. (by actix)

  • Example from official repo

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • actix-web

    Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

  • Official homepage

  • vial

    ๐Ÿงช a micro micro-framework for rust

  • All of these web frameworks are extremely heavy-weight, with hundreds of dependencies. Sometimes I wish there was more investment in lighter frameworks like https://github.com/xvxx/vial

  • axum

    Ergonomic and modular web framework built with Tokio, Tower, and Hyper

  • jelly-actix-web-starter

    Discontinued A starter template for actix-web projects that feels very Django-esque. Avoid the boring stuff and move faster.

  • warp

    A super-easy, composable, web server framework for warp speeds. (by seanmonstar)

  • Here warp for example.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • poem

    A full-featured and easy-to-use web framework with the Rust programming language.

  • Cool! Lots of cross pollination going on between the frameworks ๐Ÿ˜Š I originally got the idea for axum's middleware::from_fn from poem.

  • Rouille, Rust web server middleware

    Web framework in Rust (by tomaka)

  • I'd like to put in a word for a simple, sync framework such as rouille. The compile times are much, much better, the number of dependencies is much smaller, the stuff it's built on (the standard library) is extensively tested and extremely reliable. Kernel context switches are slower than userspace thread scheduling, but not much slower, and as long as your services aren't just shoving bytes from one place to another (i.e. actually doing some computation) the time taken for a context switch vanishes into noise. A lot of benchmarks test how quickly a web service can move bytes, which (if your business logic is non-trivial) actually isn't the most critical factor.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • (Recommendation Request) Rust REST API framework; similar to Python's FastAPI(Python)

    3 projects | /r/rust | 21 Jan 2023
  • shuttle 0.8.0 is out (actix support, static files support, better scaffolding, & more)

    2 projects | /r/rust | 30 Dec 2022
  • shuttle v0.7.1 has been released (improved isolation, new supported frameworks, QOL improvements)

    4 projects | /r/rust | 25 Oct 2022
  • A small reivew of the Poem Rust web framework

    2 projects | news.ycombinator.com | 11 Sep 2022
  • Ask HN: Anyone using Rust for server side application development?

    8 projects | news.ycombinator.com | 20 Aug 2022