Skip to main content

eggserve_core/
lib.rs

1//! Hardened static-serving primitives for eggserve.
2//!
3//! # Public API status (alpha)
4//!
5//! The public surface is intentionally conservative during the alpha period.
6//! Modules and types are divided into three buckets:
7//!
8//! - **Semver-considered (pre-1.0)**: [`config`], [`limits`], [`policy`], and
9//!   [`primitives`]. These are the intended public facades, but a minor
10//!   release may still make breaking changes before 1.0.
11//! - **Experimental**: [`server`]. The runtime and service boundary is
12//!   exposed for Rust embedders and may change independently before 1.0.
13//! - **Internal**: [`fs`], [`path`], [`response`], MIME detection, and the
14//!   error taxonomy. These are not part of the public API and are not
15//!   re-exported. External callers should not depend on them.
16//!
17//! Start with [`primitives`] when using the library without starting a
18//! server. Use [`server`] for the experimental transport-owning runtime; the
19//! repository's `static_server` and `custom_service` examples show the two
20//! supported embedding paths.
21//!
22//! # Primitives facade
23//!
24//! The [`primitives`] module is the **intended public boundary** for Rust
25//! consumers that want to embed eggserve's hardened path validation and policy
26//! enforcement without pulling in the full HTTP service layer. It re-exports
27//! the core types with invariant-focused documentation.
28//!
29//! Before 1.0, every public type or function in this crate may change without
30//! a major version bump. See `docs/release-process.md` for the manual release
31//! procedure.
32
33pub mod config;
34pub(crate) mod fs;
35pub mod limits;
36pub(crate) mod mime;
37pub mod ops;
38pub(crate) mod path;
39pub mod policy;
40pub mod primitives;
41pub(crate) mod response;
42pub mod server;
43#[cfg(feature = "tls")]
44pub mod tls;