Skip to main content

aro/
lib.rs

1//! Aro — a Rust web framework using hexagonal architecture.
2//!
3//! This facade crate re-exports functionality from the underlying crates,
4//! gated behind feature flags.
5
6pub use aro_core as core;
7
8#[cfg(feature = "web")]
9pub use aro_web as web;
10
11#[cfg(feature = "fletch")]
12pub use aro_fletch as fletch;
13
14#[cfg(feature = "macros")]
15pub use aro_macros as macros;
16
17// Re-export route attribute macros at the crate root for ergonomic use:
18// `#[aro::get("/path")]` instead of `#[aro::macros::get("/path")]`
19#[cfg(feature = "macros")]
20pub use aro_macros::{delete, get, patch, post, put};
21
22// Re-export App and routes! macro at the crate root for ergonomic use:
23// `aro::App` instead of `aro::web::App`
24// `aro::routes!` instead of `aro::web::routes!`
25#[doc(hidden)]
26#[cfg(feature = "web")]
27pub use aro_web::__aro_route_register;
28#[cfg(feature = "web")]
29pub use aro_web::App;
30#[cfg(feature = "web")]
31pub use aro_web::routes;
32
33// Re-export config module at the crate root:
34// `aro::config` instead of `aro::web::config`
35#[cfg(feature = "web")]
36pub use aro_web::config;
37
38// Re-export middleware module at the crate root:
39// `aro::middleware` instead of `aro::web::middleware`
40#[cfg(feature = "web")]
41pub use aro_web::middleware;
42
43// Re-export health module at the crate root:
44// `aro::health` instead of `aro::web::health`
45#[cfg(feature = "web")]
46pub use aro_web::health;
47
48#[cfg(feature = "test-utils")]
49pub mod test {
50    pub use aro_web::test::*;
51}
52
53pub mod prelude;