-
Notifications
You must be signed in to change notification settings - Fork 15
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 async support via Tokio #66
base: dev
Are you sure you want to change the base?
Conversation
Thanks for your PR! |
On it! |
Done. |
There’s quite a bit of code duplication between the sync and async reader implementations: there might be something we can do with macros. I'll try to think about it on my own, but maybe we can take inspiration from other crates like |
Hello, what was decided regarding this? I'd like to know. Thanks! |
Hi, I closed the PR by deleting the dev branch, I've just restored it. |
Do let me know if I can help with something after you've thought about it. |
First of all, thank you for your great work on this crate!
This PR adds support for readers that implement Tokio's
AsyncRead
andAsyncSeek
traits.My use case is determining the file format of potentially large S3 objects without having to read entire objects into memory first. A reader that implements
AsyncRead
is provided courtesy of aws_smithy_types, but forAsyncSeek
I had to implement my own wrapper on top. An example of such can be provided if needed.Adding async support required moving common functionality away from the file format readers first, then introducing async implementations of those readers in parallel with the sync versions. The commit sequence shows this step-by-step.
Please let me know if there are any changes required.