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

Add support for PlatformIO platform = native #97

Merged
merged 2 commits into from
Nov 30, 2024

Conversation

delan
Copy link
Contributor

@delan delan commented Nov 30, 2024

this patch makes cargo-pio compatible with platform = native by making the changes in #96:

  • mcu, pio_platform_dir, and pio_framework_dir are now optional in platformio.cargo.py and SconsVariables
  • rust_target is now optional in platformio.cargo.py, and completely removed from generated .cargo/config.toml

in my platformio-first project, with these changes i can now call this hello world from both embedded and native:

embedded native
image image

Copy link
Collaborator

@ivmarkov ivmarkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am myself a big fan of avoiding the MCU-flash+run step when developing firmware, so yeah - why not having it for Rust+PIO as well?

Just one nit if you could address as per below - i.e. leave the signature of create_config_toml as-is?

Then I'll merge.

src/cargo.rs Show resolved Hide resolved
@delan delan requested a review from ivmarkov November 30, 2024 08:24
@ivmarkov
Copy link
Collaborator

Thanks!

@ivmarkov ivmarkov merged commit 0e49675 into esp-rs:master Nov 30, 2024
1 check passed
@delan delan deleted the pio-native branch November 30, 2024 10:21
@delan delan mentioned this pull request Nov 30, 2024
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.

2 participants