Switch to async API #12

Closed
opened 2021-01-01 16:46:05 +13:00 by audunhalland · 3 comments
audunhalland commented 2021-01-01 16:46:05 +13:00 (Migrated from github.com)

This crate is built upon an older, pre-async version of hyper, and as a result the API is also blocking. The hyper ecosystem has moved to async.

I've analyzed a little bit what I think should be done:

Will you accept a PR?

This crate is built upon an older, pre-async version of hyper, and as a result the API is also blocking. The hyper ecosystem has moved to async. I've analyzed a little bit what I think should be done: * Depend on https://docs.rs/http instead of hyper * Depend on https://docs.rs/hyperx for various header parsers * Change `read_multipart`/`read_multipart_body` to return `futures::stream::Stream` of nodes instead of `Vec` Will you accept a PR?
mikedilger commented 2021-01-02 09:08:36 +13:00 (Migrated from github.com)

I'm not doing much rust development lately due to a change in employment.

I'm well aware of the move to async throughout the ecosystem.

Yes I would accept a PR.

I think it's also important to continue to support existing pre-async code. So perhaps an async version should start at 0.20.0 eventually aiming towards 1.0.0, and the pre-async version can continue on the low version numbers if it needs to. Or something like that (suggestions welcome).

I'm not doing much rust development lately due to a change in employment. I'm well aware of the move to async throughout the ecosystem. Yes I would accept a PR. I think it's also important to continue to support existing pre-async code. So perhaps an async version should start at 0.20.0 eventually aiming towards 1.0.0, and the pre-async version can continue on the low version numbers if it needs to. Or something like that (suggestions welcome).
audunhalland commented 2021-01-04 13:24:43 +13:00 (Migrated from github.com)

Thanks for the reply. I looked into this some more, I found that putting work into upgrading this crate would probably be duplicated effort, due to the existence of https://github.com/abonander/multipart and https://github.com/abonander/multipart-async. I was able to use the former crate to get rid of the hyper dependency.

Thanks for the reply. I looked into this some more, I found that putting work into upgrading this crate would probably be duplicated effort, due to the existence of https://github.com/abonander/multipart and https://github.com/abonander/multipart-async. I was able to use the former crate to get rid of the hyper dependency.
mikedilger commented 2021-01-06 12:21:38 +13:00 (Migrated from github.com)

Glad you've found a path forward.

Glad you've found a path forward.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mikedilger/mime-multipart#12
No description provided.