Giter Site home page Giter Site logo

roa's Introduction

Roa

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

Stable Test codecov wiki Rust Docs Crate version Download Version License: MIT


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:
    • 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
  • Works on stable Rust.

Get start

# Cargo.toml

[dependencies]
roa = "0.5.0"
async-std = { version = "1.5", features = ["attributes"] }
use roa::App;
use roa::preload::*;
use std::error::Error as StdError;

#[async_std::main]
async fn main() -> Result<(), Box<dyn StdError>> {
    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.

roa's People

Contributors

hexilee avatar goldenmetteyya avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.