-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derive Named #2758
Comments
Contrary to what the code is now, I think we should not directly use the struct name for its name. If derived macro can do that then it's good to have |
are you interested in implementing this? |
That is a fair point. It may however be hard to implement:
If I read the code correctly, |
Even just implementing the bare minimum of this however seems like a lot of work, and I don't have the capacity to do so at the moment. There is still a point to be made that a macro that just implements impl Named for MyNamedThing {
fn name(&self) -> &Cow<'static, str> {
&Cow::Borrowed("MyNamedThing")
}
} |
For this one, the name can just be local to the process. no need to synchronize |
Do you want this for now? |
I think we'd want to create a |
A lot of structs within LibAFL implement
Named
. And all of those are done manually, leading to a lot of code duplication. Would it make sense to create a derive macro that implements it based on the struct name?Is there a reason this doesn't exist already?
The text was updated successfully, but these errors were encountered: