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

Stable driver tracking issue #2491

Open
MabezDev opened this issue Nov 8, 2024 · 6 comments
Open

Stable driver tracking issue #2491

MabezDev opened this issue Nov 8, 2024 · 6 comments

Comments

@MabezDev
Copy link
Member

MabezDev commented Nov 8, 2024

Of the four drivers we're choosing to stabilize initially, we need to analyse them and determine a number of things.

  • Does the driver meet all expectations in the API-GUIDELINES document?
    • This is not just limited to the driver itself, but any substructs, configs, helpers - everything
  • Does the driver encapsulate the hardware it's designed to drive?
    • Does it offer an API that utilizes all hardware features?
    • If it doesn't, will the current API prevent us from adding that additional support in the future?
      • We should analyse the TRMs and find extra modes / alternate operation features
      • This is really important to think about, once we commit it will be a long time before we can change anything.
      • We don't need to support everything in 1.0, but we must design a driver that it extensible beyond 1.0 (without breaking changes)
  • Can the driver as a whole be stabilized?
    • Perhaps some parts/modes are not a polished and stable as other parts of the driver
    • Could we partially stabilize some of this
    • We should be conservative at first, and we can relax some unstable flags as the beta phase progresses before 1.0

Please note that this is analysis work that needs to be done, here we will analyse what's wrong. Once the analysis is complete, we can do the following:

  • Depending on the result of some parts, fix the code (light refactors, like naming etc)
  • Mark part of the driver as unstable
    • Remember this is not 1.0 yet, we can relax some of these prior to 1.0
@MabezDev MabezDev added this to the 1.0.0-beta.0 milestone Nov 8, 2024
This was referenced Nov 8, 2024
@github-project-automation github-project-automation bot moved this to Todo in esp-rs Nov 8, 2024
This was referenced Nov 8, 2024
@bugadani bugadani pinned this issue Nov 8, 2024
@Dominaezzz
Copy link
Collaborator

Will this include trait implementations?

For example, Spi implements e-hal 0.2 traits. Will these impls be considered stable too?

e-hal aside what about other trait libraries that are not themselves stable?

@bugadani
Copy link
Contributor

For example, Spi implements e-hal 0.2 traits. Will these impls be considered stable too?

We can't depend on any <1.0 crates that are visible in our public API.

@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 19, 2024

For example, Spi implements e-hal 0.2 traits. Will these impls be considered stable too?

We can't depend on any <1.0 crates that are visible in our public API.

In theory we could mark those impls as unstable forever - but ideally, we could get rid of those

@bugadani
Copy link
Contributor

bugadani commented Nov 28, 2024

We should probably do a review of the common bits as well. For example Peripheral/PeripheralRef are in violation of C-SMART-PTR - if they count as smart pointers. Also some Rust API guidelines are crate-wide rules.

@bugadani
Copy link
Contributor

bugadani commented Dec 4, 2024

Types should be UpperCamelCase, but peripheral instances are UPPERCASE (SCREAMING_SNAKE_CASE?). We should probably mention these as exceptions.

@MabezDev MabezDev changed the title Stable driver analysis tracking issue Stable driver tracking issue Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

4 participants