warp README

The project's README from github.com/seanmonstar/warp. As one markdown file: README.md.

warp

crates.io Released API docs MIT licensed GHA Build Status Discord chat

A super-easy, composable, web server framework for warp speeds.

The fundamental building block of warp is the Filter: they can be combined and composed to express rich requirements on requests.

Thanks to its Filter system, warp provides these out of the box:

Since it builds on top of hyper, you automatically get:

Example

Add warp and Tokio to your dependencies:

tokio = { version = "1", features = ["full"] }
warp = { version = "0.4", features = ["server"] }

And then get started in your main.rs:

use warp::Filter;

#[tokio::main]
async fn main() {
    // GET /hello/warp => 200 OK with body "Hello, warp!"
    let hello = warp::path!("hello" / String)
        .map(|name| format!("Hello, {}!", name));

    warp::serve(hello)
        .run(([127, 0, 0, 1], 3030))
        .await;
}

For more information you can check the docs or the examples.

warp (seanmonstar/warp)

Searching Database…

10.4K ·GitHub
What is this?warp is a super-easy, composable web server framework for Rust, promising 'warp speeds'.
How does building a server with warp actually work?Everything is a Filter: you combine and compose these building blocks to express rich requirements on requests, like paths, headers, query strings, and bodies.
How do I get a first server running?Add warp and Tokio to your Cargo dependencies, write your server in main.rs, and check the docs or the bundled examples.
Is warp free to use, even in commercial projects?Yes. It is MIT licensed, so it is free for personal and commercial use.
How steep is the learning curve?The README pitches it as super-easy thanks to composable Filters, but it runs on the Tokio async runtime, so some async Rust knowledge helps.
What are similar projects?actix-web, axum, Rocket, pingora, aiohttp, echo, starlette, fiber
Size
0.9 MB
Stars
10.4K
Age
8y
Commits · 90 Days