News for hackers. Stuff that matters.
Re:A four year plan for async Rust by pm215 on Tuesday November 07, 2023 @11:53AM (#38179227)
This was not my experience. I had a working program that used the reqwest crate for a very basic synchronous-is-fine "just give me the contents of this web page" function. When I tried upgrading it to a newer reqwest that had decided async was the way to go, I found that that nice easy to use synchronous function had simply disappeared entirely, and I seemed to have to figure out async in order to use the library now. Luckily it was only a toy project so I just left it at the older version of the library. But as my first exposure to "async" as a rust feature it was a pretty off-putting one.
Re:A four year plan for async Rust by pdw on Tuesday November 07, 2023 @12:01PM (#38179378)
For reqwest, using the feature "blocking" will enable the reqwest::blocking API.
Re:A four year plan for async Rust by theossuary on Tuesday November 07, 2023 @12:02PM (#38179395)
Reqwest still has a block client available [1]. I assume you upgraded across a major version, and are mad that there were backwards breaking changes? Don't do that if you don't want to update your code to account for changes in the dependency.

[1]: https://docs.rs/reqwest/latest/reqwest/blocking/index.html