Foxhole
A Synchronous HTTP framework for Rust
![Minimum Supported Rust Version](https://img.shields.io/badge/rustc-1.65+-ab6000.svg)
[![Crates.io](https://img.shields.io/crates/v/foxhole.svg)](https://crates.io/crates/foxhole)
[![Docs.rs](https://docs.rs/foxhole/badge.svg)](https://docs.rs/foxhole)
![Code Size](https://img.shields.io/github/languages/code-size/Kay-Conte/foxhole-rs)
![Maintained](https://img.shields.io/maintenance/yes/2023?style=flat-square)
[![License](https://img.shields.io/crates/l/foxhole.svg)](https://opensource.org/licenses/MIT)
Foxhole is a simple, fast, synchronous framework built for finishing your projects.
# Opinionated decisions
- No async. Binary bloat and poor ergonomics
- Minimal dependencies
# Features
- Blazing fast performance (~600k req/sec on a ryzen 7 5700x with `wrk`) May be outdated.
- Built-in threading system that allows you to efficiently handle requests.
- Minimal build size, ~500kb when stripped.
- Uses `http`, a model library you may already be familiar with.
- Magic function handlers! See [Getting Started](#getting-started).
- Unique powerful routing system
- near Full Http1.1 support
- Https support in the works. Available on the under feature "tls". largely Untested!
- Http2 support coming.
# Getting Started
Foxhole uses a set of handler systems and routing modules to handle requests and responses.
Here's a starting example of a Hello World server.
```rust
use foxhole::{action::Html, connection::Http1, resolve::Get, App, sys, Scope};
fn get(_get: Get) -> Html {
Html(String::from("