Re:Writing a Microservice in Rust
by steveklabnik on Friday March 09, 2018 @04:22PM
(#16555163)
You’re forgetting the difference between cargo.toml and cargo.lock. In order to solve this, cargo would have to parse your source code.
Another way to think of it is, Cargo.toml contains all metadata about the build, and this is fundamentally metadata.
* You only need to go to up to 1 file to add an import * Tools like cargo-script don't need special comment syntax for inline dependency specification. * The source code functionality arguably depends on the version of the libraries included as well as the name, so it keeps it together.
This seems pretty obvious though so I'm guessing there's a reason it wasn't done?