Skip to main content

aspect_runtime/
lib.rs

1//! # aspect-runtime
2//!
3//! Runtime utilities for aspect-oriented programming in Rust.
4//!
5//! This crate provides runtime support for aspects, including:
6//! - Global aspect registry for managing aspect-pointcut bindings
7//! - Dynamic aspect application based on pointcut patterns
8//! - Aspect ordering and composition
9//!
10//! # Example
11//!
12//! ```rust
13//! use aspect_runtime::registry::global_registry;
14//! use aspect_core::pointcut::Pointcut;
15//! use std::sync::Arc;
16//!
17//! // Register an aspect globally
18//! let pointcut = Pointcut::parse("execution(pub fn *(..))").unwrap();
19//! // global_registry().register(Arc::new(my_aspect), pointcut, 0, Some("logger".into()));
20//! ```
21
22pub mod registry;
23
24// Re-export commonly used items
25pub use registry::{global_registry, AspectRegistry, RegisteredAspect, GLOBAL_REGISTRY};
26
27// Re-export once_cell for use in generated code
28pub use once_cell;