Skip to content
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

proc: allow reexporting the macros. #72

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Feb 9, 2025

This PR:

  • reexports the pio_asm and pio_file crates from the pio crate.
  • Wraps them with a decl macro that uses $crate so that they don't break when reexported.

This has two benefits:

  • Users can now depend only on pio instead of pio+pio_proc.
  • HALs can reexport pio so the user doesn't even need to depend on pio directly, and they get the right version automatically. This has been a source of pain in embassy-rp when using git versions.

This commit shows the changes needed for HAL and user code. Works nicely. embassy-rs/embassy@65f00c5

Unfortunately to do this I've had to move the data structures to a new pio-core crate. Otherwise
pio-proc and pio would have a circular dependency.

fixes #70
depends on #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support reexporting pio_asm!
1 participant