-
Notifications
You must be signed in to change notification settings - Fork 75
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
Add maybe_async #154
base: develop
Are you sure you want to change the base?
Add maybe_async #154
Conversation
Related to #50 |
It might be worth looking at #148 where I put a |
So for this to fly, I would need the examples to build-as is, so that we know we're not breaking existing code (at least more than I have already broken it). But perhaps also an async example would be useful. And it has to build on stable. |
That's fair, I'll work on that Otherwise, I know there is a lot of debate around |
I'll judge it by the outcome. If the examples build unchanged on stable (and it works on no_std) then it should continue to work for my use case and I can support the changes. |
#148 was merged, so this will need a rebase. |
4725e3e
to
e6e5c62
Compare
@thejpster |
|
We'll want to find a way to do a build in both async mode and non-async-mode. I think you'll need to mark the existing examples as requiring the |
As this PR is not from an org member, one of us has to manually approve the workflow run every time - in case you submit a change which copies a Github secret key to pastebin or something. Sorry about that - bear with us. Alternatively you can look at the workflow files and get a good idea about what you need to run locally to replicate the CI. |
We just test for |
unfortunately it looks like adding the features to the matrix has renamed the build jobs, and so now the branch protection rule is waiting for a job that doesn't exist. I guess I'll have to manually override that check when this is ready to go, and then update the branch protection rule. GHA is such a pain to use. |
Thanks for the information! For a moment I thought the workflows were triggered by commenting here... I'll try to put the is_sync feature outside the matrix, that should resolve the renaming of workflow I just pushed the result of |
Next I'll work on async examples |
Oh, I ran cargo fmt on windows... Is it different than Linux? |
Try using 1.81. Maybe GitHub hasn't updated the image yet. |
9418299
to
a49432e
Compare
github workflow build is_sync fix workflow got renamed run `cargo fmt`
I had a rustfmt.toml file in the parent directory, limiting the line length to 120. I removed it and it fixed the issue |
IMO, this is the biggest issue with using the |
I've found a workaround in simply not using the
... so you are effectively ending up simultaneously with two versions of the code, each in its submodule. Modulo the two submodules which of course have different names, the lib otherwise is having a mostly identical api for blocking and async. A bit like having Note that I've only tried this with smaller drivers where I could fit all "maybe-async" code in a single module. Not sure how it would work for a larger codebase split across many modules. |
Here's the relevant comment in the maybe-async crate that I follow myself: fMeow/maybe-async-rs#6 (comment) |
Thank you very much for working on this @brunob45 . |
I'm using embassy, and the other repo I found (embedded-fatfs) is not supporting partition tables on the SD card.
Here is my proposal to add
maybe_async
to this repo, so it can be used "as-is", or asynchronously.I also needed to make
BlockDevice
mutable to support DMA on STM32.All comments are welcomed.