Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently procedural macros do not work outside of
uefi
crate, because they are referencing crate-local items (Guid, Protocol etc.) and when invoked from a crate other than 'uefi' those items cannot be found (well because the other crate does not have them).This is a known (as I learned) procedural macro issue and the latest best workaround is what I implemented here - allow 'uefi' to reference itself by
::uefi
and then use::uefi
in those macros.As an additional bonus (I can revert that if you have objections but it's neat and does not break anything) I made the 'entry' macro always make the exported entry function have the name 'efi_main', which is required by the rust efi target I think.
Anyway, with that change, users can name their entry function whatever they want (right now that leads to cryptic errors iirc), and the fact that this is an entry function is clearly marked by the
#[entry]
attribute above it.