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

RFC: Decouple embassy support from esp-hal #1035

Closed
jessebraham opened this issue Dec 15, 2023 · 4 comments · Fixed by #1595
Closed

RFC: Decouple embassy support from esp-hal #1035

jessebraham opened this issue Dec 15, 2023 · 4 comments · Fixed by #1595
Assignees
Labels
RFC Request for comment status:in-progress This task is currently being worked on

Comments

@jessebraham
Copy link
Member

jessebraham commented Dec 15, 2023

As things stand, we have a strong coupling to the embassy ecosystem in esp-hal. This has always struck me as a bit odd, and probably not quite "right", but for the sake of development we've continued to support embassy in-tree. This has also repeatedly caused delays where we need to wait for embassy to update and release various packages, which interferes with the HAL release cycle.

I propose that embassy support should be decoupled into a separate package, eg. esp-hal-embassy; if we continue to support other RTOS/frameworks in the future (which I would like to!), I don't want to continue accumulating cruft in the HAL.

I had taken a swing at doing this in #976 already, however some concerns were raised that I feel we don't have solutions for currently. Didn't seem like that PR was going to get merged so I've closed it for the time being. For more context please refer to the aforementioned PR.

So, I'd like to open discussion on how we can move forward to accomplish this task.

@jessebraham jessebraham added the RFC Request for comment label Dec 15, 2023
@bjoernQ
Copy link
Contributor

bjoernQ commented Dec 19, 2023

In general, it probably makes sense to move that code into its own crate

Ideally the user would only need to add one dependency and we re-export relevant things from here.

Problem might be: #976 (comment)

On the other hand one dependency more or less doesn't make much of a difference probably. The bigger problem for users might be to choose the right features and make sure to not pull incompatible versions. Might be solvable via documentation and/or esp-template

@georgik
Copy link

georgik commented Dec 19, 2023

IMO decoupling make sense. If we consider OS metaphore for Embassy, we can see that similar metaphore has been aplied to std with ESP-IDF which is also viewed as OS - FreeRTOS in this case. We could take also Zephyr and NuttX into consideration as OSes where Rust can run. Other OSes in this case might be derrived from sytems TockOS.
It's question whether such generic principle could be found for all theses OSes. Yet, at least exploration of Embassy as OS makes sense.

@jessebraham
Copy link
Member Author

Related: #1063

@jessebraham
Copy link
Member Author

I think once my next Timer abstraction PR lands we'll be in pretty good shape for this, so going to pick it back up soon.

@jessebraham jessebraham added the status:in-progress This task is currently being worked on label May 8, 2024
@jessebraham jessebraham changed the title RFC: Decouple embassy support from esp-hal-common RFC: Decouple embassy support from esp-hal May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request for comment status:in-progress This task is currently being worked on
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants