• Stars
    star
    251
  • Rank 161,862 (Top 4 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

async web framework inspired by koajs, lightweight but powerful.

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.

More Repositories

1

tifs

A distributed POSIX filesystem based on TiKV, with partition tolerance and strict consistency.
Rust
356
star
2

async-io-demo

demo for rust asynchronous io: from mio to stackless coroutine
Rust
348
star
3

unhtml.rs

A magic html parser
Rust
194
star
4

unhtml

HTML unmarshaler for golang
Go
55
star
5

async-postgres

A runtime-independent asynchronus PostgreSQL client
Rust
32
star
6

htest

htest is a http-test package
Go
24
star
7

BronzeDB

kv database built in rust
Rust
7
star
8

my_spider

็ˆฌๆบ็จ‹้…’ๅบ—่ฏ„่ฎบ
Python
6
star
9

modern-memory-management

no new, no delete, compare modern memory management in cpp with that in rust programming language.
C++
6
star
10

gotten

A powerful web SDK builder for go, like retrofit for java
Go
5
star
11

rover

A toy web browser
Rust
3
star
12

interfacer-http

A magic http client, like retrofit in Java
Rust
3
star
13

RFC-HTTP_1.1-zh

HTTP 1.1 RFC๏ผˆ RFC-7230 ~ RFC-7235 ๏ผ‰็š„ไธญๆ–‡็ฟป่ฏ‘
2
star
14

iobench

io/network benchmark comparison between different languages in different cases
Go
2
star
15

async-block-send

This repo aims to summarize and explain rust-lang/rust#64477 and rust-lang/rust#64856.
1
star
16

silver-io

An asynchronous IO library inspired by Future and Tokio of Rust community.
C++
1
star
17

cobra-example

An example to get cobra works.
Go
1
star
18

sgrep

Search words in everything
Rust
1
star
19

fictions

fictions written by my little pussy
1
star
20

hexilee.github.io

My website
HTML
1
star
21

tracing

non-invasive tracing for Golang
1
star
22

order-dishes

ไปŠๅคฉๅƒ็‚นๅ•ฅ
JavaScript
1
star