1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! 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.
pub use Body;
pub use Config;
pub use ;
pub use Headers;
pub use Json;
pub use Method;
pub use ;
pub use Plugin;
pub use Request;
pub use Response;
pub use Router;
pub use ;
pub use Status;
/// The crate version, from Cargo at build time.
pub const VERSION: &str = env!;