Skip to content

A comparison of some web frameworks and libs written in Rust

Notifications You must be signed in to change notification settings

limira/rust-web-framework-comparison

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust web framework comparison

A comparison of some web frameworks written in Rust.

Table of Contents

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:

Outdated server frameworks

Client frameworks

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

Outdated client frameworks

Frontend frameworks (WASM)

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

Outdated frontend frameworks

Supplemental libraries

Websocket

Templating

Comparison

High-Level Frameworks

Name rocket iron actix-web nickel gotham rouille Thruster jsonrpc
License Rocket license Iron license Actix-web license Nickel license Gotham license Rouille license Thruster license Jsonrpc license
Github Stars Rocket stars Iron stars Actix-web stars Nickel stars Gotham stars Rouille stars Thruster stars Jsonrpc stars
Contributors Rocket contributors Iron contributors Actix-web contributors Nickel contributors Gotham contributors Rouille contributors Thruster contributors Jsonrpc contributors
Server yes yes yes yes yes yes yes no
Client no no yes no no no no yes
Base framework hyper hyper tokio hyper hyper tiny-http tokio hyper
HTTPS support yes yes no yes ? -
HTTP/2 support ? yes ? no ? ?
Async no yes yes yes

Low-Level Frameworks

Name hyper h2 tiny-http
License Hyper license H2 license Tiny-http license
Github Stars Hyper stars H2 stars Tiny-http stars
Contributors Hyper contributors H2 contributors Tiny-http contributors
Server yes yes yes
Client yes yes ?
HTTPS support yes no yes
HTTP/2 support solicit yes ?
Async yes yes

Frontend Frameworks

Name yew stdweb percy dodrio sauron seed draco squark willow smithy
License Yew license Stdweb license Percy license Dodrio license Sauron license Seed license Draco license Squark license Willow license Smithy license
Github Stars Yew stars Stdweb stars Percy stars Dodrio stars Sauron stars Seed stars Draco stars Squark stars Willow stars Smithy stars
Contributors Yew contributors Stdweb contributors Percy contributors Dodrio contributors Sauron contributors Seed contributors Draco contributors Squark contributors Willow contributors Smithy contributors
Stable Rust yes yes no ? no yes yes no no no
Base framework stdweb - wasm-bindgen wasm-bindgen wasm-bindgen wasm-bindgen wasm-bindgen wasm-bindgen wasm-bindgen wasm-bindgen
Virtual DOM yes ? yes yes yes yes yes yes ? yes

Middleware & Plugins

Name iron gotham nickel rouille actix-web
Static File Serving yes no^ yes n/a yes
Mounting yes yes yes n/a yes
Logging yes yes no n/a 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 actix-web
License Websocket license Ws-rs license Twist license Tungstenite license Actix-web license
Github Stars Websocket stars Ws-rs stars Twist stars Tungstenite stars Actix-web stars
Contributors Websocket contributors Ws-rs contributors Twist contributors Tungstenite contributors Actix-web contributors
Server yes yes yes yes yes
Client yes yes yes yes yes
Base framework - / tokio mio tokio - / tokio tokio
Async no / yes yes yes no / 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.

Resources

Blog posts

2018

Until 2017

Demos

Real-world web projects using Rust

JS & asm.js & WASM

Examples

Benchmark

About

A comparison of some web frameworks and libs written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 67.0%
  • HTML 24.1%
  • Shell 5.5%
  • Nix 3.4%