Hello,
Every so often, I have code that needs to make an HTTP request. To me, making an HTTP request feels like something that is very common and very basic.
So I'm looking on crates.io
, and it seems one of the most popular crates for HTTP requests is reqwest. Since it is async
, which I heard is a good thing for networking, I also need an async runtime, and it looks like the most popular is tokio.
So I'm adding reqwest and tokio to my project, and now suddenly Cargo pulls what looks to me like a very long list of dependencies (even if I only use the "rt" feature for tokio). And all I wanted was making an HTTP request, which I thought was a very basic, and very common thing to do.
So how should I think about this?
- "Yeah, making an HTTP request in Rust is just awkward. There should be a popular choice with far less overhead, but we aren't there yet."
- "What do you mean HTTP is simple? It's very challenging to do it right! Be glad that the smart people from reqwest and tokio worked so hard to make it happen the right way!"
- "Well, that's your own fault you are choosing such heavy-weight solutions. Simply use something light-weight, such as ..."
- "There's no reason to worry about the dependencies. They won't burden you in any significant way. Just relax and keep using reqwest and tokio and all will be perfectly fine."
- "What do you mean many dependencies? That's nothing! The average Rust project has many more!"
So what do people think? Thanks!