• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Hexilee/roa: async web framework inspired by koajs, lightweight but powerful.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

Hexilee/roa

开源软件地址:

https://github.com/Hexilee/roa

开源编程语言:

Rust 99.3%

开源软件介绍:

Roa

Roa is an async web framework inspired by koajs, lightweight but powerful.

Stable Test codecov wiki Rust Docs Crate version Download MSRV-1.54 License: MIT

Examples | Guide | Cookbook


Feature highlights

  • A lightweight, solid and well extensible core.
    • Supports HTTP/1.x and HTTP/2.0 protocols.
    • Full streaming.
    • Highly extensible middleware system.
    • Based on hyper, runtime-independent, you can chose async runtime as you like.
  • Many useful extensions.
    • Official runtime schemes:
      • (Default) tokio runtime and TcpStream.
      • async-std runtime and TcpStream.
    • Transparent content compression (br, gzip, deflate, zstd).
    • Configurable and nestable router.
    • Named uri parameters(query and router parameter).
    • Cookie and jwt support.
    • HTTPS support.
    • WebSocket support.
    • Asynchronous multipart form support.
    • Other middlewares(logger, CORS .etc).
  • Integrations
    • roa-diesel, integration with diesel.
    • roa-juniper, integration with juniper.
  • Works on stable Rust.

Get start

# Cargo.toml

[dependencies]
roa = "0.6"
tokio = { version = "1.15", features = ["rt", "macro"] }
use roa::App;
use roa::preload::*;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let app = App::new().end("Hello, World");
    app.listen("127.0.0.1:8000", |addr| {
        println!("Server is listening on {}", addr)
    })?
    .await?;
    Ok(())
}

Refer to wiki for more details.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap