#web-server #rocket-web #web #axum #server-api #rocket #warp

sailfish-web

Simple extension crate that enables a simpler api for web server crates

2 releases

0.1.1 Jun 17, 2024
0.1.0 Jun 11, 2024

#1122 in HTTP server

Download history 126/week @ 2024-06-07 172/week @ 2024-06-14 14/week @ 2024-06-21 2/week @ 2024-06-28 7/week @ 2024-07-05

57 downloads per month

MIT license

21KB
160 lines

Sailfish-Web

Simple extension crate that enables a simpler api for web server crates and other conveniences

Examples

#[derive(TemplateOnce)]
#[template(path = "test.stpl")]
struct TestTemplate<'a> {
    s: &'a str,
}

#[get("/hello")]
fn hello() -> RawHtml<String> {
    TemplateWrapper::from(TestTemplate { s: "test" }).into()
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![hello])
}

For more examples you can check the examples.

Dependencies

~0.2–32MB
~486K SLoC