-
Notifications
You must be signed in to change notification settings - Fork 0
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
Provide or document how to create an asynchronous interface #4
Comments
"It seeams that in order to provide such functionality we need to add AsyncReader / AsyncWriter and probably an asynchronous version of CdcSerial." I hadn't considered adding such feature because "The USB manager and intent checking part may also require some changes." I don't think so. PS: busy fixing a bug in Slint UI (issue 7203), I will not implement the asynchronous interface for this crate soon. |
There are several use cases that comes into my mind. The Rinf for Flutter is asynchronous by default and Tauri has async option. Both of them can use asynchronous API for Android serial connection. As far as I am concerned, my own library for MavLink provides both sync and async interfaces and I want to support Android out of the box for both API flavours. Still, I do understand why you may not want to go into this direction. Supporting two types of API is extremely labourious. |
I've released a new version of my crate which allows taking |
A reminder of existing problems in the released version 0.2.2: The possible crate-level The Trait I can't find any implementation in the original Struct |
This is a suggested improvement.
Right now the library has only synchronous interface but the
nusb
used under the hood is async-first. It would be nice to have an option to use this library in asynchronous environments with minimal (or no) overhead from extra threads.It seeams that in order to provide such functionality we need to add
AsyncReader
/AsyncWriter
and probably an asynchronous version ofCdcSerial
. The USB manager and intent checking part may also require some changes.The text was updated successfully, but these errors were encountered: