10 lines
790 B
Markdown
10 lines
790 B
Markdown
# The goal
|
|
|
|
The goal of this crate is to find a way to annotate functions with an attribute macro like `#[get("/")]` and have it automatically added in a global registry.
|
|
Actix for example still requires you to register all functions annotated in such a way with the service method, I don't need to do that in Spring Boot applications, I just use the necessary annotations.
|
|
|
|
|
|
Turns out there is a way to do this with the ctor or ctor_lite crate. Seems simple enough and I need to find out which one I would prefer.
|
|
I think ctor_lite as I will wrap this in my own attribute macro anyway for my library. In an application I would probably prefer ctor as I personally find attribute macros more readable.
|
|
There seems to be no real differences between the two crates other than the macro type.
|