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

#118 Add support for latest embedded-io #123

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

elast0ny
Copy link
Contributor

This adds a new embedded-io-06 feature which allows users to use the latest embedded_io v 0.6.*.

Backwards compatibility is maintained with the previous embedded-io which is now setup to activate the embedded-io-04 feature internally.

Copy link

netlify bot commented Jan 11, 2024

Deploy Preview for cute-starship-2d9c9b canceled.

Name Link
🔨 Latest commit 46124bb
🔍 Latest deploy log https://app.netlify.com/sites/cute-starship-2d9c9b/deploys/65a07047dc4b76000849f899

@elast0ny elast0ny changed the title Add support for latest embedded-io #118 Add support for latest embedded-io Jan 12, 2024
@jamesmunns
Copy link
Owner

Thank you @elast0ny! I'm not 100% I want to use the pattern you did, of mutually exclusive features. I may want to instead offer both, in separate modules, with the existing embedded-io meaning 0.4, and mark it as deprecated.

See also #115 and #121. I'll want to be consistent with whatever I decide for the version bump.

@jamesmunns jamesmunns linked an issue Jan 12, 2024 that may be closed by this pull request
@elast0ny
Copy link
Contributor Author

elast0ny commented Jan 12, 2024

Thanks for the quick reply ! I needed support for v0.6 so I'll probably go on and use my fork given that this depends on some design decisions and #115 / #121 being resolved.

Let me know when you have a concrete path forward for this and I'll see if I can update my branch/PR !

Edit :

offer both, in separate modules

This would be nice but may lead to lots of duplicated impls (unless we write some macro-foo that swaps the trait bounds for each embedded-io version).

For example, you might need to copy paste the implementation of EIOReader for each version included so that it can have the proper embedded_io::*::Read bound. The bummer is that most/all of those impls will work exactly the same (calling reader.read()) regardless of what "incompatible" Read trait we use.

@jamesmunns
Copy link
Owner

I'm going to merge this and then move it around a bit, thank you @elast0ny!

@jamesmunns jamesmunns merged commit 2ddc52b into jamesmunns:main Jan 14, 2024
4 checks passed
@elast0ny
Copy link
Contributor Author

No problem ! Just as an FYI, I've opened rust-embedded/embedded-hal#566 to see if we cant get a "stable" embedded-io release. It would be nice if the ecosystem would converge to a 1.0.0 that will hopefully stick around for a long time.

dtolnay added a commit to dtolnay/typetag that referenced this pull request Aug 20, 2024
The way that `postcard` depends on 2 different versions of `embedded-io`
(as of jamesmunns/postcard#123) apparently fools `cargo outdated`.

    Name                   Project  Compat  Latest  Kind    Platform
    ----                   -------  ------  ------  ----    --------
    postcard->embedded-io  0.6.1    0.4.0   0.4.0   Normal  ---
dtolnay added a commit to serde-rs/bench that referenced this pull request Aug 25, 2024
The way that `postcard` depends on 2 different versions of `embedded-io`
(as of jamesmunns/postcard#123) apparently fools `cargo outdated`.

    Name                   Project  Compat  Latest  Kind    Platform
    ----                   -------  ------  ------  ----    --------
    postcard->embedded-io  0.4.0    ---     0.6.1   Normal  ---
    postcard->embedded-io  0.6.1    0.4.0   ---     Normal  ---
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 latest version of embedded-io
2 participants