12 releases

new 0.1.13 Sep 28, 2024
0.1.12 Sep 23, 2024
0.1.10 Aug 21, 2024
0.1.8 Jul 15, 2024
0.1.5 Jun 20, 2024

#232 in HTTP server

Download history 207/week @ 2024-06-07 471/week @ 2024-06-14 91/week @ 2024-06-21 140/week @ 2024-06-28 130/week @ 2024-07-05 114/week @ 2024-07-12 11/week @ 2024-07-19 31/week @ 2024-07-26 4/week @ 2024-08-02 120/week @ 2024-08-09 115/week @ 2024-08-16 24/week @ 2024-08-23 123/week @ 2024-08-30 21/week @ 2024-09-06 54/week @ 2024-09-13 170/week @ 2024-09-20

368 downloads per month

MIT license

94KB
1.5K SLoC

Krustie - A Basic Backend Framework

github crates.io docs.rs build status

Krustie is a simple and easy-to-use backend framework. It is designed to be a simple and easy-to-use web server that can be used for a variety of purposes. Krustie's error-prone design makes it difficult to write incorrect code.

Krustie is still in the early stages of development and is not yet ready for production use. The API is subject to change and there may be bugs or missing features.

Features

  • Router with support for parameter and query string parsing
  • Middleware support for routers and endpoints
  • JSON data parsing and serialization (using the serde library)

Built-in Middlewares

  • Static file serving
  • Rate limiting
  • Gzip compression

Start your server

use krustie::{ Router, Server, StatusCode };

fn main() {
    let mut server = Server::create();
    let mut router = Router::new();

    router.get("/", |_, res| {
        res.status(StatusCode::Ok).body_text("Hello World!");
    });

    server.use_handler(router);

    server.listen(8080);
}

Contributing

All contributions are welcomed. Please open an issue or a pull request to report a bug or request a feature.

Dependencies

~3–4.5MB
~80K SLoC