Tokio included when there is no async/await wanted

Friends

I am building a Rust programme to play an important role in my place of work.

Quite deliberately I have avoided async/await (for many good reasons that are not relevant here)

I am using:reqwest = { version = "0.11", features = ["blocking"] } but clearly that is not enough to stop reqwest including tokio

Is there a way to use reqwest without pulling in tokio? (Should I be raising an issue with the authors?)

Alternatively is there a honest-to-goodness synchronous web client?

I would be very happy with one that used callbacks similarly to (shiver) XMLHttpRequest

I am seeing, when I do a clean build:

Compiling tokio-util v0.7.10
Compiling tokio v1.36.0
Compiling tokio-native-tls v0.3.1

which is concerning. I am not interested in including software I do not use

1 Like

ureq perhaps?

No. The blocking feature just wraps the async impl.

ureq is the main non-async client I'm aware of as well.

3 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.