目录

服务器框架

过时的服务器框架

客户框架

过时的客户框架

前端框架(WASM)

补充库

WebSocket

模板

对照

高级框架

低级框架

前端框架

中间件和插件

Websocket库

资源

博客文章

演示

使用Rust的真实世界Web项目

JS&asm.js&WASM

Server frameworks

使用Rust构建Web应用程序有几个有趣的框架:

如果您需要更低级别的控件,可以在这些库之间进行选择:

过时的服务器框架

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 :)

stdweb ( - / repository / documentation ) A standard library for the client-side Web

yew ( - / repository / documentation ) - A frontend framework inspired by Elm and React (based on stdweb)

percy ( homepage / repository / - ) - A modular toolkit for building isomorphic web apps

seed ( homepage / repository / - ) - A Rust framework for creating web apps

draco ( - / repository / documentation ) - A frontend framework inpired by Redux and Elm

smithy ( - / repository / - documentation ) - A front-end framework

squark ( - / repository / documentation ) - Rust frontend framework, for web browser and more.

ruukh ( - / repository / documentation ) - A frontend framework inspired by Vue and React

willow ( homepage - / repository / - ) - A frontend framework inspired by Elm

dodrio ( - / repository / documentation ) - A fast, bump-allocated virtual DOM library.

sauron ( - / repository / documentation - Sauron is an html web framework for building web-apps. It is heavily inspired by elm.

Supplemental libraries

Websocket

Templating

对照

高级框架

Name

rocket

iron

actix-web

nickel

gotham

rouille

Thruster

jsonrpc

easeLicense

Github Stars

Contributors

Server

yes

yes

yes

yes

yes

yes

yes

no

no

Client

no

no

yes

no

no

no

no

yes

yes

Base framework

hyper

hyper

tokio

hyper

hyper

tiny-http

tokio

hyper

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

tk-httpLicense

Github Stars

Contributors

Server

yes

yes

yes

yes

Client

yes

yes

?

yes

HTTPS support

yes

no

yes

yes

HTTP/2 support

solicit

yes

?

no

Async

yes

yes

yes

Frontend Frameworks

Name

yew

stdweb

percy

dodrio

sauron

seed

ruukh

draco

squark

willow

smithyLicense

Github Stars

Contributors

Stable Rust

yes

yes

no

?

no

yes

no

yes

no

no

no

Base framework

stdweb

-

wasm-bindgen

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-webStatic File Serving

no^

yes

n/a

Mounting

yes

yes

n/a

Logging

yes

no

n/a

JSON-Body-Parsing

yes

yes

n/a

Sessions

yes

?

n/a

Cookies

yes

?

n/a

PostgreSQL middleware

?

no^

n/a

SQLite middleware

?

no^

n/a

Redis middleware

?

no^

n/a

MySQL middleware

?

no^

n/a

(^ Planned in current roadmap)

Websocket Libraries

Name

websocket

ws-rs

twist

tungstenite

tk-http

actix-webLicense

Github Stars

Contributors

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.

Resources

Blog posts

2018

Until 2017

Demos

rustwebapp - Iron and Postgres (r2d2)

webrust - Iron and Postgres (r2d2)

nickel-todo-backend - Nickel and Postgres (r2d2)

rust-web-example - Iron + Diesel (r2d2) + Serde

websocket chat - Actix: Browser Websocket + tcp chat

diesel - Actix + Diesel

json - Actix + serde_json or json_rust

Real-world web projects using Rust

paste.rs - Rocket

Portier - Iron and Redis

yaus - Iron and SQLite

racerd - Iron

mars - Hyper

openfairdb - Rocket and Neo4j (r2d2)

ruma - Iron and Posgres (diesel + r2d2)hellorust.com - a website with news, resources and demos

Examples

rust-webapp-template - Template project for Rust web app using stdweb

rust-todomvc - an example application build with webplatform

wasm-experiments - experiments with wasm32-unknown-unknown

Benchmark

benchmarks - Rust web frameworks benchmarks

which_is_the_fastest - Measuring response times (routing times) for each framework (middleware). Each framework has to have two features; routing and parsing path parameters.

Rust actix aiohttp_【Rust架构】Rust web框架比较相关推荐

  1. Rust actix aiohttp_介绍 - actix-web 中文文档 - Rust-Web 开发指南

    actix-web 是 Rust 生态中的最为优秀的 web 框架之一,具有类型安全.功能丰富.扩展性强,以及速度极快的诸多优点. 让我们通过 actix-web 的典型代码,来对其做一个整体认知. ...

  2. Rust actix aiohttp_如何看待 Rust Actix 库的维护者退出开源界?

    更新:actix-web已经找到了接手维护者. 新的维护者看上去是一个比较靠谱的开发者,看到他也参与bastion这个项目,该项目旨在用Rust实现一个类Erlang VM(BEAM)的东东.感觉ac ...

  3. Rust actix aiohttp_如何看待 Rust 社区关于 Actix 框架的讨论事件?

    我一直在做Rust日报,所以这件事,我基本上是第一时间就吃瓜了. 怎么看待呢?我认为,搬个小板凳,吃瓜就好了,没必要去站队. 为什么呢?这种讨论,对Rust发展也有好的一面. Unsafe Rust官 ...

  4. Python明星web框架Flask

    Flask简介 Flask是一个相对于Django而言轻量级的Web框架. 和Django大包大揽不同,Flask建立于一系列的开源软件包之上,这其中 最主要的是WSGI应用开发库Werkzeug和模 ...

  5. Python超级明星WEB框架Flask

    Flask简介 Flask是一个相对于Django而言轻量级的Web框架. 和Django大包大揽不同,Flask建立于一系列的开源软件包之上,这其中 最主要的是WSGI应用开发库Werkzeug和模 ...

  6. python django flask介绍_Python开发WEB框架Flask详细介绍

    Flask简介 Flask是一个相对于Django而言轻量级的Web框架. 和Django大包大揽不同,Flask建立于一系列的开源软件包之上,这其中 最主要的是WSGI应用开发库Werkzeug和模 ...

  7. 【Rust 日报】2022-10-16 全栈同构Web框架leptos

    leptos:全栈同构Web框架 Leptos 是一个全栈.同构的 Rust Web 框架,利用细粒度的响应式来构建声明性用户界面. 全栈:可用于构建在浏览器.服务器或通过在服务器上渲染 HTML 然 ...

  8. 【一起学Rust | 框架篇 | Viz框架】轻量级 Web 框架——Viz

    文章目录 前言 特点 一.Hello Viz 1. 创建项目 2. 引入viz 3. 运行Hello Viz 4. 运行结果 注意 二.Hello Viz代码详解 导入组件 处理请求 主函数 三.常见 ...

  9. rust自创服务器_用Rust写了一个简单的Web服务器

    Rust 最近学了一阵Rust,这个语言的目的是系统编程,卖点是无GC的内存安全.为了实现这一点,Rust引入了所有权.借用.生命周期的概念.可以在编译器检查出可能的内存问题,如野指针.局部变量指针等 ...

最新文章

  1. 对比学习还能这样用:字节推出真正的多到多翻译模型mRASP2
  2. 找出占用磁盘空间最大的前10个文件或文件夹
  3. pass在python中啥意思_python3中的pass是什么意思
  4. java 对象结构_java对象的结构
  5. 投资理财web后端系统_如何挑选现金类理财产品?三大对比了解一下
  6. android:fillviewport=true 不起作用,无法在android模拟器中滚动
  7. python中的字典和类的区别_Python:我应该使用类还是字典?
  8. 42、C++ Primer 4th笔记,IO库,未格式化IO操作
  9. Java中Xml文件的解析
  10. postgresql学习笔记(五)备份与恢复
  11. python如何将抓取的数据保存到excel_Python实现提取XML内容并保存到Excel中的方法...
  12. 麒麟系统stty测试串口
  13. c语言常见头文件大全,C语言头文件大全(free)
  14. 多图预警~ 华为 ECS 与 阿里云 ECS 对比实战
  15. 线阵相机、镜头及光源的选型
  16. 繁星闪烁 ,芳华似锦,走自己的路
  17. Word打开docx文件报错
  18. tsv文件导入mysql
  19. 阿里云maven 仓库地址配置
  20. 一文解读如何评估项目的价值和可行性?

热门文章

  1. 中企海外周报 | 支付宝借力RiverPay进军欧洲健康品牌1600多家门店;汉能启用荷兰最大薄膜太阳能发电工业园...
  2. Quaternion kinematics for the error-state Kalman filter 学习笔记
  3. 《社交网站界面设计(原书第2版)》——3.15 你是否在犯4种常见的用户onboarding错误...
  4. 关于LCD显示屏颜色的适配方法
  5. 滤波算法 | 算术平均滤波法
  6. Debian9.2 下使用vnstat查看服务器带宽流量统计
  7. 分享公众号里创建答题活动的方法_微信如何做答题活动
  8. CMOS 摄像头的Skipping 和 Binning 模式
  9. 数据压缩笔记[5] 视频解码器缓冲区防止下溢条件推导
  10. 阿里云轻量应用型服务器和ECS服务器比较