How can a Rust program access metadata from its Cargo package?
How do you access a Cargo package’s metadata (e.g. version) from the Rust code in the package? In my case, I am building a command line tool that I’d like to have a standard –version flag, and I’d like the implementation to read the version of the package from Cargo.toml so I don’t have to … Read more