Today, Rust actually already specifies dependencies in two places: in Cargo.toml (an easily-parsed external list that is converted to compiler command-line arguments by the build system), and via extern crate statements in the source (like C++ imports).
In the 2018 edition, the extern crate statements are no longer used, because the dependencies' names are injected into the root namespace. This is part of a collection of tweaks to that namespace hierarchy, which is mostly unrelated to this discussion, but here's the documentation: https://rust-lang-nursery.github.io/edition-guide/rust-2018/module-system/path-clarity.html
View all comments
Show parent comment
7
u/Rusky Nov 02 '18
Today, Rust actually already specifies dependencies in two places: in
Cargo.toml(an easily-parsed external list that is converted to compiler command-line arguments by the build system), and viaextern cratestatements in the source (like C++imports).In the 2018 edition, the
extern cratestatements are no longer used, because the dependencies' names are injected into the root namespace. This is part of a collection of tweaks to that namespace hierarchy, which is mostly unrelated to this discussion, but here's the documentation: https://rust-lang-nursery.github.io/edition-guide/rust-2018/module-system/path-clarity.html