Some crates offer a pub const &str
-version string, some do not. To have a general solution, I need a list of all dependencies and their versions as known to and used by cargo build
during compilation so I can build my own const &str
of This is my own version and all the versions I was compiled with-Debug output.
Is it possible to get a list of all dependencies and their version in build.rs
?
Cargo.lock
seems to be a good source. Is it actually sound to parse Cargo.lock
in build.rs
? Is it guaranteed to have been updated to what Cargo actually uses and written to disk?