#tcp-server #server #tcp #web #async

nightly bin+lib rust_tcp_sever

A simple and lightweight asynchronous TCP server crate

15 releases

new 0.3.0 Jan 19, 2025
0.2.3 Nov 22, 2024
0.2.0 Oct 9, 2024
0.1.9 Sep 21, 2024
0.1.6 Jul 28, 2024

#254 in HTTP server

Download history 41/week @ 2024-09-22 19/week @ 2024-09-29 188/week @ 2024-10-06 15/week @ 2024-10-13 120/week @ 2024-11-03 7/week @ 2024-11-10 334/week @ 2024-11-17 49/week @ 2024-11-24 13/week @ 2024-12-01 1/week @ 2024-12-08

974 downloads per month

MIT license

36KB
544 lines

Rust TcpSever

Rust TcpSever is a simple and lightweight asynchronous library for running and using a server.

github.com license crates.io Documentation

Supported Protocols

Usage examples:

Cargo.toml:

[dependencies]
rust_tcp_sever = "0.3.0"

src/main.rs:

use rust_tcp_sever::*;

#[tokio::main]
async fn main() {
    HttpServer::launch(TcpListener::bind("127.0.0.1:80").await.unwrap(), work).await;
}

async fn work(_request: Request) -> Response {
    Response::from_response("200 OK", "All good work :)")
}

Future of the Library

The library will be updated as new proposals and ideas are received. I will try to post a new update every month.

Dependencies

~2.8–9MB
~78K SLoC