4 releases (breaking)

Uses old Rust 2015

0.4.0 Oct 19, 2018
0.3.0 Oct 26, 2017
0.2.0 Oct 18, 2017
0.1.0 Oct 15, 2017

#254 in Web programming

Download history 210/week @ 2021-04-04 156/week @ 2021-04-11 85/week @ 2021-04-18 93/week @ 2021-04-25 179/week @ 2021-05-02 178/week @ 2021-05-09 155/week @ 2021-05-16 72/week @ 2021-05-23 72/week @ 2021-05-30 77/week @ 2021-06-06 87/week @ 2021-06-13 83/week @ 2021-06-20 40/week @ 2021-06-27 52/week @ 2021-07-04 64/week @ 2021-07-11 67/week @ 2021-07-18

650 downloads per month
Used in 4 crates


530 lines


a crate for building a simple blocking HTTP server

Build Status crates.io

NOTE: this crate has not been evaluated for security concerns. therefore, we recommend that you take caution before using it in a production application.

up and running

this crate is written in the rust programming language. you'll need rust to run this crate. you can install rust using rustup. simple-server requires that you use rust version 1.20+.

to get this crate running locally:

  1. fork and clone this repository
  2. cd simple-server
  3. cargo build

to use this crate in your project, add the following line to your Cargo.toml in the [dependencies] section:

simple-server = "0.3.0"

to see this crate in action, check out the examples.


to test this crate locally, run:

cargo test


this crate has documentation. to build and open the docs locally:

cargo doc --open


there are several examples provided with this crate:

to run an example:

cargo run --example <name of example>

this crate uses the log crate for logging. in the example, we use the env-logger crate to display the logs. by default, env-logger only prints out error-level logs. to enable info-level logging as well, you'll need to do one of the following depending on your system:

on Linux/OS X:

RUST_LOG="simple_server=info" cargo run --example server

on Windows PowerShell:

cargo run --example server


simple-server is licensed under both the Apache2 and MIT licenses.


~24K SLoC