hydra_macros/lib.rs
1use proc_macro::TokenStream;
2
3mod entry;
4
5/// Marks an async function to be executed as a hydra application.
6///
7/// Note: This macro is designed to be simplistic, if you wish to customize your application, you should
8/// implement the trait yourself and call `run` instead.
9///
10/// If the feature `tracing` is enabled, this will automatically setup a subscriber and panic hook.
11#[proc_macro_attribute]
12pub fn main(arg: TokenStream, item: TokenStream) -> TokenStream {
13 entry::main(arg, item)
14}
15
16/// Marks an async function to be executed as a hydra application suitable for the test environment.
17#[proc_macro_attribute]
18pub fn test(arg: TokenStream, item: TokenStream) -> TokenStream {
19 entry::test(arg, item)
20}