Reusing other libraries is a common task in software engineering, which is why easy dependency management was built into cargo from the start. Third-party dependencies (called crates) are stored in a registry called crates.io (https://crates.io), a public platform for users to find and discover crates. Private registries are also available, starting with Rust 1.34. With Cargo.toml as a central point in this process, let's dive into specifying those dependencies well.
Using dependencies and external crates
How to do it...
Let's see how dependency management works in these steps:
- As we are going to print on the command line, let's create a new binary application using cargo new external-deps and open it in...