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

Whether to support async-std? #58

Closed
gmg137 opened this issue Apr 1, 2020 · 4 comments · Fixed by #72
Closed

Whether to support async-std? #58

gmg137 opened this issue Apr 1, 2020 · 4 comments · Fixed by #72

Comments

@gmg137
Copy link

gmg137 commented Apr 1, 2020

Is there any consideration to support async-std?

@Empty2k12
Copy link
Collaborator

I have never worked with async-std, is it easy to support both async-std and Tokio? If so PRs are open!

@gmg137
Copy link
Author

gmg137 commented Apr 1, 2020

I am not very clear, you may need to replace reqwest to isahc.

@JEnoch
Copy link
Contributor

JEnoch commented Nov 4, 2020

Hi @Empty2k12 ,
Working on integration InfluxDB in our project (eclipse-zenoh/zenoh#47) I would also be very interested to have influxdb-rust supporting async-std.
I made a quick experiment of porting it to async-std = "1.6.5" and surf = "2.1.0" here, and it seems to work find. However I have no clue on how to make it support both async-std and tokio! If you have some hint, I can work on that.
But if you're keen for a definitive switch to async-std, I can also do a PR of my changes.

@JEnoch
Copy link
Contributor

JEnoch commented Nov 4, 2020

Looking further it appears that surf supports both async-std and tokio (as it relies on http-client that supports both).
I added the code to run some tests with async-std and others with tokio, and it's fine.
I'll create a PR now.

Empty2k12 pushed a commit that referenced this issue Nov 12, 2020
* Replaced tokio with async-std 1.6.5 and reqwest with surf 2.1.0

* Test with both async-std and tokio

* Fix clipy warning

* Add features to choose http lib: hyper-client (default), curl-client, h1-client or wasm-client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants