Specifying Dependencies - The Cargo Book - Rust
doc.rust-lang.org › cargo › referenceRenaming dependencies in Cargo.toml. When writing a [dependencies] section in Cargo.toml the key you write for a dependency typically matches up to the name of the crate you import from in the code. For some projects, though, you may wish to reference the crate with a different name in the code regardless of how it's published on crates.io.
Dependency Resolution - The Cargo Book - Rust
doc.rust-lang.org › cargo › referenceDependency Resolution. One of Cargo's primary tasks is to determine the versions of dependencies to use based on the version requirements specified in each package. This process is called "dependency resolution" and is performed by the "resolver". The result of the resolution is stored in the Cargo.lock file which "locks" the dependencies to ...
Dev-dependencies - Rust By Example
doc.rust-lang.org › testing › dev_dependenciesDevelopment dependencies. Sometimes there is a need to have dependencies for tests (or examples, or benchmarks) only. Such dependencies are added to Cargo.toml in the [dev-dependencies] section. These dependencies are not propagated to other packages which depend on this package. One such example is using a crate that extends standard assert ...
Dependencies - Rust By Example
doc.rust-lang.org › stable › rust-by-exampleDependencies. Most programs have dependencies on some libraries. If you have ever managed dependencies by hand, you know how much of a pain this can be. Luckily, the Rust ecosystem comes standard with cargo! cargo can manage dependencies for a project. To create a new Rust project, # A binary cargo new foo # OR A library cargo new --lib foo