A comparison of some web frameworks and libs written in Rust
Switch branches/tags
Nothing to show
Clone or download
flosse Merge pull request #58 from xpe/patch-1
Iron is not deprecated
Latest commit a5a74e8 Sep 5, 2018

README.md

Rust web framework comparison

A comparison of some web frameworks written in Rust.

Server frameworks

There are several interesting frameworks to build web applications with Rust:

If you need a more low level control you can choose between these libraries:

Client frameworks

To build web clients with Rust, you can choose between these libraries:

Frontend frameworks (WASM)

Since WASM support is available in most browsers we can use Rust to build webb applications :)

Supplemental libraries

Websocket

Templating

Resources

Blog posts

2018

Until 2017

Demos

Real-world web projects using Rust

JS & asm.js & WASM

  • stdweb - A standard library for the client-side Web
  • webplatform - a library for use with emscripten to access the DOM.
  • hellorust.com - a website with news, resources and demos

Examples

Benchmark

Comparison

High-Level Frameworks

Name iron gotham rocket nickel rustful rustless conduit rouille ease jsonrpc pencil sappers boron shio actix-web Thruster
License MIT MIT / Apache 2.0 MIT / Apache 2.0 MIT MIT MIT MIT Apache 2.0 MIT CC0-1.0 BSD-3-Clause MIT MIT MIT / Apache 2.0 MIT / Apache 2.0 MIT
Github Stars 4.4k 0.7k 2.7k 1.9k 0.8k 0.3k 0.1k 0.1k 0.1k 0k 0.8k 0.4k 0k 0.1k 0.3k 0k
Contributors 67 19 28 49 11 11 5 4 2 2 4 1 2 3 7 4
Server yes yes yes yes yes yes yes yes no no yes yes yes yes yes yes
Client no no no no no no no no yes yes no no no no yes no
Base framework hyper hyper hyper hyper hyper iron civet tiny-http hyper hyper hyper hyper hyper hyper tokio tokio
HTTPS support yes yes no yes ? ? ? - - ? ? no yes
HTTP/2 support ? no ? ? ? ? ? ? ? ? ? no yes
Async yes no yes yes yes

Low-Level Frameworks

Name civet hyper tiny-http solicit kinglet hydrogen tk-http h2
License MIT MIT Apache 2.0 MIT MIT MPL 2.0 MIT / Apache 2.0 MIT / Apache 2.0
Github Stars 0k 2.7k 0.2k 0.2k 0.1k 0.4k 0.1k 0.1k
Contributors 4 112 9 8 1 2 5 8
Server yes yes yes yes yes yes yes yes
Client no yes ? yes no no yes yes
HTTPS support yes yes - - no yes no
HTTP/2 support solicit ? yes - no no yes
Async yes yes yes

Middleware & Plugins

Name iron gotham nickel conduit rouille rustful rustless pencil sappers actix-web
Static File Serving yes no^ yes yes n/a ? ? yes ? yes
Mounting yes yes yes ? n/a ? ? ? ? yes
Logging yes yes no ? n/a ? ? yes ? yes
JSON-Body-Parsing yes yes yes ? n/a ? ? ? ? yes
Sessions yes yes ? ? n/a ? ? ? ? yes
Cookies yes yes ? ? n/a ? ? ? ? yes
PostgreSQL middleware ? no^ yes ? n/a ? ? ? ? yes
SQLite middleware ? no^ yes ? n/a ? ? ? ? yes
Redis middleware ? no^ yes ? n/a ? ? ? ? yes
MySQL middleware ? no^ yes ? n/a ? ? ? ? yes

(^ Planned in current roadmap)

Websocket Libraries

Name websocket ws-rs twist tungstenite tk-http actix-web
License MIT MIT MIT / Apache 2.0 MIT / Apache 2.0 MIT / Apache 2.0 MIT / Apache 2.0
Github Stars 0.4k 0.5k 0k 0.1k 0.1k 0.3k
Contributors 31 25 2 8 5 7
Server yes yes yes yes yes yes
Client yes yes yes yes yes yes
Base framework - / tokio mio tokio - / tokio tokio tokio
Async no / yes yes yes no / yes yes yes

Examples

To compile or run the examples use Cargo. First clone this repo

git clone https://github.com/flosse/rust-web-framework-comparison
cd rust-web-framework-comparison/

and change to the desired frameworkd directory (e.g. cd iron/) and type

cargo run --example hello_world

Then visit http://localhost:3000 to see the result.