-
Notifications
You must be signed in to change notification settings - Fork 3
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
(Breaking) API changes | Part 2 #15
base: main
Are you sure you want to change the base?
Conversation
That's great. I couldn't update to 0.58 before because it broke the async integration.
I'm not sure if these two cases have a meaningful difference. In the end both prevent you from obtaining the serial number. In general I would like to keep the platform specific differences in api surface as small as possible. I really dislike it when I successfully build something on one platform and when I try to compile the same program for another and it fails because some functions from my "cross-platform" dependency simply vanished. I feel like all core functions should be available on all platforms with a somewhat consistent behaviour. (Except for really obvious cases such as
I see your point, maybe we can move these converter functions into
I also thought about that. However, I feel like for common usecase of either [Write request, Wait for reply] or [Wait for event, Write response] kind of "sequential" operations having one object that represents the device feels better to me than having two, implicitly connected, objects. I have to think about it a bit more. |
https://developer.chrome.com/docs/capabilities/hid?hl=en
I think we still will need an additional enumeration by criteria function after all. |
Yes, but if you call |
So I finally found some time to experiment a bit. I think this is currently my favourite design for handling the splitting of reader and writer. It should pretty much be your design, except that I moved the read/write functions to a trait and implemented said traits for I also experimented a bit with putting the backend behind a trait to better express the various auto-trait requirements for the various functions. Putting the backend behind a trait would also allow for having multiple backends enabled at the same time and doing runtime backend detection/fallback. I'm a bit worried about "infecting" everything the the |
That looks good. 👍 |
Hello, i've decided to temporarily halt my work on WebAssembly. There are numerous issues to be tackled to make my implementation compatible with Async-HID. For now, I'd like to focus on other things. I wanted to ask if you need help with splitting the device into Reader & Writer. I'm also working on a crate that I would like to publish, but it relies on our new features which are not yet available on crates.io for async-HID. |
I'm sorry for the delay, but my work has been a bit busy the last month and weekends are over way to fast. I feel like it should still be January. First things first, do you only need the win32 implementation or also the reader/writer split? I don't think I'll need help on the Reader/Writer front as it should be mostly copy-and-pasting stuff into the new "framework". If I remember correctly your design goals for the API change were the split Reader/Writer and access the the platform specific identifier, right? Or did I miss something? |
The current status of the Main branch would be completely sufficient for my concern. Would you release a new crates version for this?
That is correct, I have viewed the source code in the other branch and find it appealing. |
I just released version 0.2.0 of this crate. It should soon appear on crates.io. |
Unfortunately the merge turned out a bit messy. I have now adapted lib.rs as announced in my other pull request. Let's continue the discussion here.
We can make HashableHString obsolete btw by updating the windows crate to .59.