Go to file
2025-03-17 10:17:57 +01:00
src Add example using linkme 2025-03-17 10:17:57 +01:00
.gitignore Initial commit 2025-03-05 19:52:18 +01:00
Cargo.lock Add example using linkme 2025-03-17 10:17:57 +01:00
Cargo.toml Add example using linkme 2025-03-17 10:17:57 +01:00
Readme.md Try out ctor and ctor_lite 2025-03-14 13:29:25 +01:00

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.