MCPcopy Index your code
hub / github.com/Hexilee/roa

github.com/Hexilee/roa @roa-core-v0.6.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release roa-core-v0.6.1 ↗ · + Follow
495 symbols 1,267 edges 74 files 106 documented · 21% updated 3y agoroa-juniper-v0.6.0 · 2022-01-17★ 2481 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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"] }

```rust,no_run 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.

Extension points exported contracts — how you extend this code

Middleware (Interface)
(no doc) [9 implementers]
roa-core/src/middleware.rs
Listener (Interface)
An app extension. [1 implementers]
roa-async-std/src/listener.rs
CookieGetter (Interface)
A context extension. This extension must be used in downstream of middleware `cookier_parser`, otherwise you cannot get [1 …
roa/src/cookie.rs
AsyncPool (Interface)
(no doc) [1 implementers]
roa-diesel/src/pool.rs
Endpoint (Interface)
(no doc) [14 implementers]
roa-core/src/middleware.rs
CookieSetter (Interface)
An extension to set cookie. [1 implementers]
roa/src/cookie.rs
SqlQuery (Interface)
(no doc) [1 implementers]
roa-diesel/src/async_ext.rs
Spawn (Interface)
Executor constraint. [3 implementers]
roa-core/src/executor.rs

Core symbols most depended-on inside this repo

end
called by 69
roa-core/src/app.rs
spawn
called by 52
roa-core/src/executor.rs
clone
called by 51
roa-core/src/app.rs
send
called by 48
integration/websocket-example/src/main.rs
run
called by 44
roa/src/tcp/listener.rs
get
called by 41
roa-core/src/context.rs
gate
called by 35
roa/src/router.rs
on
called by 22
roa/src/router.rs

Shape

Method 236
Function 162
Class 70
Interface 19
Enum 8

Languages

Rust100%

Modules by API surface

tests/restful.rs22 symbols
roa/src/router/path.rs22 symbols
roa/src/router.rs22 symbols
roa-core/src/context.rs22 symbols
roa/src/body.rs21 symbols
roa-core/src/body.rs19 symbols
roa/src/cors.rs18 symbols
roa-core/src/group.rs15 symbols
roa/src/jwt.rs14 symbols
roa/src/cookie.rs14 symbols
roa/src/compress.rs13 symbols
roa-core/src/context/storage.rs13 symbols

For agents

$ claude mcp add roa \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact