arcature 2026.1.0

Arcature application framework: a high-level Application facade over the certified Arcature subsystems, with the low-level Axum/Tower escape hatch preserved.
Documentation
// The high-level Application engine (engine phase). One responsibility per
// file (AGENTS.md §1). `mod.rs` declares child modules and re-exports the
// public surface; it contains no business logic.

mod builder;
mod error;
// Lifecycle modules need the `macros` runtime + at least one lifecycle
// subsystem. Under `macros`-alone the `Resources` struct is empty and
// `startup`/`shutdown` are no-ops; the plain `run` path is correct there.
#[cfg(feature = "jobs")]
mod jobs_registry;
// Lifecycle modules need the `macros` runtime + at least one lifecycle
// subsystem. Under `macros`-alone the `Resources` struct is empty and
// `startup`/`shutdown` are no-ops; the plain `run` path is correct there.
mod into_router;
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
mod resources;
mod serve;
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
mod serve_with_lifecycle;
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
pub(crate) mod shutdown;
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
pub(crate) mod startup;
mod ty;

// `run` binds a `TcpListener` on the certified Tokio runtime; gated by the
// `macros` feature, which brings in `tokio` (net + signal). An expert user
// without `macros` still serves via `Application::serve` on their own runtime.
#[cfg(feature = "macros")]
mod run;
// `run_with_lifecycle` needs the `macros` runtime + at least one lifecycle
// subsystem feature (db/cache/storage/mail/jobs). Under `macros`-alone the
// `Resources` type is empty and the lifecycle is a no-op — the plain `run`
// path is the correct entry point there.
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
mod run_with_lifecycle;

pub use builder::ApplicationBuilder;
pub use error::EngineError;
pub use error::Result;
pub use ty::Application;
pub use ty::ProxyFn;

// Lifecycle types are only exported when the `macros` feature is on (the
// feature that brings the Tokio runtime + CancellationToken needed by
// `run_with_lifecycle`). Under `--no-default-features` these types have no
// use site — exporting them would be dead code.
//
// These re-exports are the public API surface for applications using
// `run_with_lifecycle`; clippy's `unused_imports` lint is suppressed because
// the imports are the API, not internal use sites.
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
#[allow(unused_imports)]
pub use error::{ShutdownError, StartupError};
#[cfg(all(
    feature = "macros",
    any(
        feature = "db",
        feature = "cache",
        feature = "storage",
        feature = "mail",
        feature = "jobs"
    )
))]
pub use resources::Resources;