-
Notifications
You must be signed in to change notification settings - Fork 23
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
support reexporting pio_asm!
#70
Comments
As it is a function-like macro, this workaround (taken from https://internals.rust-lang.org/t/rfc-crate-for-proc-macro/16968) could work:
Ie., define a https://github.com/Nullus157/stylish-rs/blob/stylish-macros-0.1.2/core/src/lib.rs#L121 is an example where this method is used. |
ooh that's a clever trick. I'm going to give it a try, first step is #71 |
I'd like to reexport
pio
,pio-proc
fromembassy-rp
, so the user doesn't have to depend on them directly. It's nicer because it ensures the right version is used, so it avoids version mismatch errors of doom.However, currently
pio_asm!
generates code that does::pio::whatever
. This doesn't work unlesspio
is in scope in the end user's crate. I'm not sure if this is fixable with proc macros though? With decl macros you'd use$crate
, but that doesn't seem to exist for proc macros.The text was updated successfully, but these errors were encountered: