I think you may have misunderstood package management with cargo.
Since in3
is a library and not a binary crate, you cannot install it.
cargo install
does not install dependencies like npm install
or pip install
does. cargo install
will install binaries into your local filesystem (typically $HOME/.cargo/bin) for you to run.
Cargo will resolve dependencies for you when you cargo run/check/build
. You do not need to install dependencies.
You may want to start a new folder structure and try the following:
cargo init
. This will create a new binary packageCargo.toml
and add the in3
dependency and version.main.rs
file to use the in3
library.cargo run
. You will notice that cargo is resolving various dependencies while compiling your program.For more info on Cargo, here is the getting started guide.