71 releases

new 0.2.30 Mar 12, 2026
0.2.27 Feb 27, 2026
0.2.15 Dec 25, 2025
0.2.13 Sep 23, 2025
0.1.7 Dec 30, 2024

#1793 in HTTP server

MIT license

4MB
3.5K SLoC

potato

version status

English | 简体中文

High-performance, concise syntax HTTP framework.

Usage

Online Documentation

Add the library reference:

cargo add potato
cargo add tokio --features full

Hello Server

// http://127.0.0.1:8080/hello
#[http_get("/hello")]
async fn hello() -> potato::HttpResponse {
    potato::HttpResponse::html("hello world")
}

#[tokio::main]
async fn main() {
    let mut server = potato::HttpServer::new("0.0.0.0:8080");
    _ = server.serve_http().await;
}

Hello Client

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let res = potato::get("https://www.fawdlstty.com", vec![]).await?;
    println!("{}", String::from_utf8(res.body)?);
    Ok(())
}

More Examples

Please refer to: https://github.com/fawdlstty/potato/tree/main/examples

Dependencies

~9–48MB
~692K SLoC