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

Use zbindeps (moved to nightly) #4

Merged
merged 1 commit into from
Nov 25, 2023
Merged

Use zbindeps (moved to nightly) #4

merged 1 commit into from
Nov 25, 2023

Conversation

rukai
Copy link
Owner

@rukai rukai commented Nov 25, 2023

This PR moves the project to nightly rust to make use of the unstable bindeps cargo feature.
This allows us to cleanly pull the firmware into the flasher tool without having to reinvoke cargo from within a build.rs.
The previous implementation was fine and I wouldnt recommend swapping to nightly just for this, but I think this feature is really cool and I would like to use this project as a testbed for the feature so I can contribute towards seeing it stabilized.

That said there are some really nice wins here:

  • simplified build logic, cargo handles it all for me now.
  • all the benefits of keeping the project in one workspace: cargo fmt, cargo clippy etc run on all the packages at once. Does not seem to be possible. Maybe one day... Instead I have a workspace including the flasher but excluding the firmware.
  • rust-toolchains.toml was not being triggered by the inner cargo call resulting in build failures due to missing thumbv6m-none-eabi toolchain. Using bindeps fixes this issue.
  • I can remove the manual workarounds from cargo-dist needed because the root of the repo wasnt the root of the crate. I could have just done this anyway by adding a workspace consisting only of the flasher, which I have now done.

@rukai rukai force-pushed the use_zbindeps branch 4 times, most recently from d023516 to 1321594 Compare November 25, 2023 04:35
@rukai rukai merged commit cec1323 into main Nov 25, 2023
8 checks passed
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.

1 participant