Skip to content
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

Replace async-std with smol crates #201

Merged
merged 3 commits into from
Oct 8, 2023
Merged

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Sep 21, 2023

It would be nice to be able to use this in environments where I use
smol. However this crate imports the async-std crate for I/O. This
commit partially replaces async-std with the equivalent combinators from
futures-lite and async-io, two smol crates that async-std depends on
anyways.

The task spawn is still left in, as replacing it will be controversial. Thus far I've just replaced it with async-global-executor, which is what async-std uses anyways. This is a placeholder until we can discuss what the best way of not using a global executor is.

It would be nice to be able to use this in environments where I use
smol. However this crate imports the async-std crate for I/O. This
commit partially replaces async-std with the equivalent combinators from
futures-lite and async-io, two smol crates that async-std depends on
anyways.

The task spawn is still left in, as replacing it will be controversial.

Signed-off-by: John Nunley <dev@notgull.net>
This is a placeholder until I figure out how to actually handle this
without the global executor.

Signed-off-by: John Nunley <dev@notgull.net>
This helps cargo-add work better

Signed-off-by: John Nunley <dev@notgull.net>
@notgull
Copy link
Contributor Author

notgull commented Oct 8, 2023

@joshtriplett Are you the primary maintainer of this crate? If so, can you review this?

@joshtriplett
Copy link
Member

"primary maintainer" no, but I'm one of the maintainers.

Reducing dependencies seems reasonable to me. That will let more things build in parallel, and as you said, allow using this in environments that don't need all of the dependencies.

@joshtriplett joshtriplett merged commit e6953ac into http-rs:main Oct 8, 2023
2 of 3 checks passed
@notgull notgull deleted the no-async-std branch October 8, 2023 06:26
@notgull
Copy link
Contributor Author

notgull commented Oct 8, 2023

Thanks for merging!

"primary maintainer" no, but I'm one of the maintainers.

Hmm, is there someone better I should request reviews from in the future?

@jbr
Copy link
Member

jbr commented Oct 9, 2023

Async-h1, along with the other http-rs crates, is not generally actively maintained, so Josh is as good a tag as there is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants