joist 1.0.0

A backend framework for Rust: routing, middleware, JSON, config and plugins, with no third-party dependencies.
Documentation
//! Joist is a backend framework for Rust with no third-party dependencies.
//!
//! ```no_run
//! use joist::{Response, Router, Server};
//!
//! let mut router = Router::new();
//! router.get("/hello/:name", |req| {
//!     Response::text(format!("hello {}", req.param("name").unwrap_or("world")))
//! });
//!
//! Server::new(router).bind("127.0.0.1:8080").unwrap().wait();
//! ```
//!
//! # What is here, and what is not
//!
//! This is version 0.1. It ships routing, middleware, request and response
//! types, a JSON value, configuration, a plugin trait, and a threaded HTTP/1.1
//! server. WebSockets, authentication, migrations, background jobs, queues,
//! caching and observability are on the roadmap and are **not** implemented.
//! Nothing here pretends to do something it does not do.
//!
//! # Threads, not async
//!
//! Joist serves each connection on a worker thread from a fixed pool. That is a
//! real ceiling: a few thousand idle connections cost a few thousand threads,
//! where an async runtime would cost almost nothing. It buys a framework you can
//! read in an afternoon, handlers that are ordinary functions, and stack traces
//! that mean what they say. Choose accordingly.

#![forbid(unsafe_code)]

pub mod body;
pub mod config;
pub mod error;
pub mod headers;
pub mod json;
pub mod method;
pub mod middleware;
pub mod plugin;
pub mod pool;
pub mod request;
pub mod response;
pub mod router;
pub mod server;
pub mod status;

pub use body::Body;
pub use config::Config;
pub use error::{Error, Result};
pub use headers::Headers;
pub use json::Json;
pub use method::Method;
pub use middleware::{Cors, Middleware, RequestLog};
pub use plugin::Plugin;
pub use request::Request;
pub use response::Response;
pub use router::Router;
pub use server::{Running, Server, Shutdown};
pub use status::Status;

/// The crate version, from Cargo at build time.
pub const VERSION: &str = env!("CARGO_PKG_VERSION");