oxidy

Super Fast & High Performance minimalist web framework for rust

```rust use oxidy::structs::Context; use oxidy::server::Server; use oxidy::structs::Middleware; use std::time::Instant;

fn mid(: &mut Context) -> Middleware { let start = Instant::now(); ( true, Some(Box::new(move |: &mut Context| { let end = Instant::now(); println!("Response Time: {:?}", end - start); })), ) }

fn index(ctx: &mut Context) -> () { ctx.response.body = "Index Page".to_string(); }

fn main() { let mut app = Server::new(); app.middleware(mid); app.get("/", index); app.listen("127.0.0.1:3000"); } ```

Description

Super Fast & High Performance minimalist web framework for rust built on top of rust standard library TcpListener & TcpStream.

This project is highly inspired by

Features

Install

This is a crate (Rust Module) available on crate.io. Before install download & install rust.

Quick Start

[dependencies] oxidy = "<version>"

```rust use oxidy::structs::Context; use oxidy::server::Server;

fn index(ctx: &mut Context) -> () { ctx.response.body = "Index Page".to_string(); }

fn main() { let mut app = Server::new(); app.get("/", index); app.listen("127.0.0.1:3000"); } ```

Tested On Rust Stable Version & Edition 2021

License

GNU GPL v2.0