larust_core/lib.rs
1//! Application bootstrap: config loading, logging, and the Axum server.
2//!
3//! Re-exports `axum` so generated Larust applications don't need to depend
4//! on it directly for router/type access. `tokio` cannot be re-exported the
5//! same way because `#[tokio::main]`'s macro expansion requires `tokio` to
6//! be a directly resolvable crate name at the call site.
7
8mod application;
9mod config;
10mod debug;
11mod dev_reload;
12mod error;
13mod error_pages;
14mod lifecycle;
15mod logging;
16mod paths;
17mod state;
18
19pub use application::Application;
20pub use config::{config, try_config, Config};
21pub use error::AppError;
22pub use error_pages::{default_internal_html, default_not_found_html, ErrorPages};
23pub use lifecycle::GracefulShutdown;
24pub use paths::{resolve_app_root, try_paths, AppPaths};
25pub use state::AppState;
26
27pub use axum;
28
29/// Escape hatch for this crate's own `src/bin/*_fixture.rs` integration-test
30/// fixtures - a binary under `src/bin/` is a *separate* crate from this
31/// library, even though it shares the same package, so it can only reach
32/// `pub` items, never `pub(crate)` ones, the same as any other external
33/// consumer. Not part of the stable public API: no semver guarantees, not
34/// intended for use outside this crate's own `tests/`.
35#[doc(hidden)]
36pub mod __internal {
37 pub use crate::lifecycle::{admin, handoff, listener};
38}