January 2019
Intermediate to advanced
316 pages
8h 8m
English
This is probably the most important section for most developers. The dependencies section contains a list of values that represent crate names on crates.io (or your configured private registry) as keys along with the version as values.
Instead of the version string, it's equally possible to provide an inline table as a value that specifies optionality or other fields:
[dependencies]hyper = "*"rand = { version = "0.5", optional = true }
Interestingly, since this is an object, TOML allows us to use it like a section:
[dependencies]hyper = "*"[dependencies.rand]version = "0.5"features = ["stdweb"]
Since, in the 2018 edition, the extern crate declarations inside the .rs files are optional, renaming a dependency can be done inside ...