-
Notifications
You must be signed in to change notification settings - Fork 2
(WIP) Implementation of an adapter for Read/Write traits (from embedded-io) #4
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for the PR! I really do like the idea behind this and can see the possible use cases. I'd be happy to include this if you get everything working fine and can include proper tests and an usage example. Cool stuff! |
|
I have reached a first draft version I'm fairly satisfied with. I have included a simple test and a very minimal example to show how I expect the adapter to be used. I will begin using this interface in a private project of mine, to see how it behaves in a more realistic context. There is still some TODOs left in comments, some of which require changes in other parts of the code. For example, in order to avoid constructing a |
|
Thanks a lot for the updates. I'll be sure to review this as soon as I can :) |
During the last few days, I worked on trying to implement an adapter for Read/Write traits from embedded-io (nostd, noalloc). The goal is to be able to take an object that is Read+Write (like a TCPSocket) and turn it into an object that is still Read+Write but that uses Noise under the hood. Ultimately, I want to also implement AsyncRead/AsyncWrite.
I don't know if such a feature would be of interest to be included here. Let me know if you have any feedback or suggestion, and feel free to close this PR if it is out of scope of this project.
(Right now, this PR is just a PoC and is missing at least some thorough testing.)