I come from a Java background, and I am using the hyper library to build an HTTP proxy. So I added hyper
and tokio
to Cargo.toml. I was following the http_proxy example, but first I had to add http
and futures-util
to Cargo.toml. Otherwise, rustc reported an error.
error[E0433]: failed to resolve: use of undeclared crate or module http
The hyper
crate depends on http
, so it means the dependency in cargo can't be shared to my project?
But I see the http 0.2.3
in Clion's External Libraries
list. In a Java project built by Maven, the dependency can be shared from jar to my project, So I can use it directly.