#performance #web #high #add #full

potato

A very simple and high performance http library

27 releases

new 0.1.26 Mar 23, 2025
0.1.25 Mar 19, 2025
0.1.23 Jan 23, 2025
0.1.7 Dec 30, 2024

#587 in HTTP server

Download history 221/week @ 2024-12-14 405/week @ 2024-12-21 895/week @ 2024-12-28 531/week @ 2025-01-04 551/week @ 2025-01-11 506/week @ 2025-01-18 43/week @ 2025-01-25 22/week @ 2025-02-01 4/week @ 2025-02-08 3/week @ 2025-02-15 179/week @ 2025-03-15

180 downloads per month

MIT license

4MB
2K SLoC

potato

version status

高性能、简洁语法的HTTP框架。

用法

加入库的引用:

cargo add potato
cargo add tokio --features full

Hello World

use potato::*;

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

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

更多示例请参考:https://github.com/fawdlstty/potato/tree/main/examples

Dependencies

~17–29MB
~492K SLoC