arcature 2026.0.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 curated Arcature prelude.
//!
//! `use arcature::prelude::*;` brings the normal-user surface into scope: the
//! [`Application`] engine, the low-level [`App`] kernel, the [`Routes`]
//! router alias, routing functions, common extractors and response helpers,
//! the engine [`Result`], and (when the `serde` feature is on) Serde's
//! `Serialize`/`Deserialize`.
//!
//! The prelude is deliberately *curated*, not a glob of every dependency (engine
//! spec §19): it avoids name collisions and wildcard re-exports of entire
//! upstream crates. The full surface of each subsystem lives under its facade
//! module (e.g. `arcature::inertia`, `arcature::db`) — reach for those when you
//! need a type not in the prelude.
//!
//! # Selected capability types
//!
//! When a subsystem feature is enabled, the prelude re-exports its primary
//! entry-point type so normal application code rarely needs a qualified path:
//!
//! | Feature    | Prelude export |
//! |------------|----------------|
//! | `inertia`  | `Inertia` |
//! | `db`       | `Db` |
//! | `auth`     | (use `arcature::auth` directly — sessions/CSRF/OAuth are context-dependent) |
//! | `cache`    | `Cache` |
//! | `storage`  | `Storage` |
//! | `mail`     | `Mailer` |
//! | `jobs`     | `Jobs` |
//! | `pages`    | `Pages` |
//! | `observe`  | `RequestId` |
//! | `api`      | `Problem` |
//!
//! Enabling a feature *compiles* these APIs through the facade; it does not
//! connect to a runtime service (engine spec §14).

// Framework-owned types (always available — no feature gate).
pub use crate::app::App;
pub use crate::application::Application;
pub use crate::application::Result;
pub use crate::proxy::ProxyAction;
pub use crate::proxy::ProxyRequest;
pub use crate::routing::Routes;

// Routing constructors (the certified Axum functions, re-exported so normal
// code never names `axum::` directly).
pub use crate::routing::{any, delete, from_fn, get, head, options, patch, post, put};

// Common HTTP extractors. `State` and `Path` live in `axum-core` and are
// always available. `Json`/`Query`/`Form` require axum's `json`/`query`/`form`
// features, which are activated by the `api` feature (arcature-api enables
// them); they are re-exported only when `api` is on so the minimal kernel
// stays minimal (engine spec §55).
pub use crate::axum::extract::{Path, State};

// Body-decoding extractors — available when the `api` feature activates
// axum's `json`/`query`/`form` features via arcature-api.
#[cfg(feature = "api")]
pub use crate::axum::extract::{Form, Json, Query};

// Common response helpers.
pub use crate::axum::http::{HeaderMap, StatusCode, Uri};
pub use crate::axum::response::{IntoResponse, Response};

// Serde surface (opt-in via the `serde` feature, or transitively via
// `inertia`/`api`). Lets a normal app derive `Serialize`/`Deserialize` for
// props/models without a direct `serde` dependency (engine spec §44).
#[cfg(feature = "serde")]
pub use serde::{Deserialize, Serialize};

// Selected capability entry points — one primary type per enabled subsystem.
// The full surface of each lives under its facade module (`crate::<subsystem>`).
#[cfg(feature = "api")]
pub use crate::api::Problem;
#[cfg(feature = "cache")]
pub use crate::cache::Cache;
#[cfg(feature = "db")]
pub use crate::db::Db;
#[cfg(feature = "inertia")]
pub use crate::inertia::Inertia;
#[cfg(feature = "jobs")]
pub use crate::jobs::Jobs;
#[cfg(feature = "mail")]
pub use crate::mail::Mailer;
#[cfg(feature = "observe")]
pub use crate::observe::RequestId;
#[cfg(feature = "pages")]
pub use crate::pages::Pages;
#[cfg(feature = "storage")]
pub use crate::storage::Storage;