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

Switch to embedded-hal 1.0.0 #77

Closed
Rahix opened this issue Oct 2, 2020 · 4 comments
Closed

Switch to embedded-hal 1.0.0 #77

Rahix opened this issue Oct 2, 2020 · 4 comments

Comments

@Rahix
Copy link
Owner

Rahix commented Oct 2, 2020

Not sure when is a good time to do this but it would be great to be an early adopter of the new traits :) They bring a lot of improvements to ergnomics and usability which would help the readability of downstream code a lot.

We do, however, have to consider that most drivers won't have updated yet so we have to be careful as to not become 100% incompatible. Maybe there is a possibility for a compat-shim layer or a cargo-feature to allow using the older version in parallel?

@Rahix
Copy link
Owner Author

Rahix commented Oct 26, 2020

For reference, some other HALs have gone the route of supporting both the release and alpha versions of embedded-hal at the same time:

https://github.com/lpc-rs/lpc8xx-hal/blob/6e787f8e26d908b3cea13c3c47f04695f4112837/Cargo.toml#L40-L46

If done carefully, I could see this bringing nice benefits. We could have the HAL API look nice because of the alpha traits but still keep compatibility with 'old' drivers through the release version.

@Rahix Rahix removed the hal-impl label Jul 17, 2021
@mjhouse
Copy link

mjhouse commented Oct 15, 2021

@Rahix, what's the status on this? I've written a little lcd 16x2 library and I'd like to publish it, but it relies on avr-hal which isn't on crates.io.

EDIT: nevermind- avr-hal-generic has embedded-hal traits for pins.

@stappersg
Copy link
Contributor

For what it is worth, merge request #621 is titled "[arduino-hal] remove embedded-hal-v0 dependency".

@Rahix
Copy link
Owner Author

Rahix commented Jan 4, 2025

This issue was mostly taken care of in #488 which unfortunately never got linked back here. There were some additional PRs like #517, but I think by now the transition can be considered completed.

@Rahix Rahix closed this as completed Jan 4, 2025
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

No branches or pull requests

3 participants