-
Notifications
You must be signed in to change notification settings - Fork 351
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
Make crate used in entry_point
configurable
#2068
Conversation
Whether the attribute is a string or a path can be changed pretty easily, so whatever fits better into the desired look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change, but very nicely done. LGTM, thanks!
AFAIK what you've done is idiomatic, so all good! |
Great stuff. But one naming thing: Aren't we setting the "module" there, not the "crate"? |
Technically yes, you can set a module here and not only a crate. But I took the naming in this case from |
okay, sure. Thanks for the clarification. I don't expect sub-module usages here anyways. From the very few users of the option, the majority puts in fact a different crate name in it. |
Replaces #1539
This PR makes the crate used in the expansion of the
entry_point
macro configurable.But with actual error handling and a nice syntax.
Rename example:
#[entry_point(crate = "::my_crate::cw_std_reexport")]
It also rejects other attributes and syntaxes:
TODO: