4 ms·
Hmm. As a developer, how would one learn if you want no async, "instead of reqwest you use ureq crate"? unless they happen to search on HN first? Is there a wa
by reacharavindh 3y ago
Hmm. As a developer, how would one learn if you want no async, "instead of reqwest you use ureq crate"? unless they happen to search on HN first?
Is there a way to tell Rust tool chain that async stuff is to be disabled, and importantly, is there a way to search the crate library with a filter for no async?
Asking because I could only find a category for explicitly async crates, not the other way around..
https://crates.io/categories/asynchronous https://crates.io/categories/asynchronous
- jen20 3y ago> As a developer, how would one learn if you want no async, "instead of reqwest you use ureq crate"? I just googled "synchronous rust http client" - the top result was a Stack Overflow question where the top (accepted) answer listed ureq as the first option. (I'd still just use reqwest and Tokio though - practically speaking most of the concerns are non-issues in day-to-day work)
- jamil7 3y ago> (I'd still just use reqwest and Tokio though - practically speaking most of the concerns are non-issues in day-to-day work) I actually did the opposite recently and replaced reqwest with ureq and managed to drop async and tokio altogether and greatly simplify my library. As a newcomer to Rust I kept getting pointed towards reqwest and tokio when ureq is far simpler.
- jen20 3y agoWithout knowing what your library does, it's hard to tell if the simplification benefit is worthwhile when traded off against the lack of usability from apps which should not be blocking worker threads. Could well be, but overall I'd just use Tokio and Reqwest (which has a module exposing a blocking API, even!)