preprocessor
English | 简体中文
Compile-time computation macro library — analyzes computable sub-expressions in code and evaluates parts that can be executed at compile time.
Installation
cargo add preprocessor
Usage
#[optimize] — Function-level attribute macro
cargo add chrono
op! — Expression-level macro
cargo add chrono
Async Support
The op! macro fully supports async/await and the ? operator, enabling compile-time evaluation of asynchronous code:
cargo add tokio reqwest
async
Key Features:
- ✅ Full async/await support
- ✅
?error propagation operator - ✅ Compile-time evaluation of async operations