#web-server #routes #world #index #h1 #rustigo

rustigo

A Rust webserver inspired by the Go standard library's HTTPServer

4 stable releases

new 1.1.4 Apr 30, 2025
1.1.3 Mar 28, 2024
1.1.1 Dec 10, 2023

#1229 in HTTP server

Download history

174 downloads per month

MIT license

14KB
310 lines

Rustigo is a simple web server that allows you to handle requests with ease.

Example usage:

use rustigo::prelude::*;

fn index(stream: TcpStream, _: Request) {
    html!(stream; "<h1>Hello, world!</h1>");
}

fn main() {
    let mut rustigo = Rustigo::default();

    rustigo.handle("/", Arc::new(index));

    rustigo.listen("localhost:7878", 4).unwrap();
}

Rustigo

A Rust webserver inspired by the Go standard library's HTTPServer

Features:

  • Lightweight
  • Pattern matched routes
  • No dependencies

Example

use rustigo::prelude::*;

fn index(stream: TcpStream, _: Request) {
    html!(stream; "<h1>Hello, world!</h1>");
}

fn main() {
    let mut rustigo = Rustigo::default();

    rustigo.handle("/", Arc::new(index));

    rustigo.listen("localhost:7878", 4).unwrap();
}

No runtime deps