How can a Rust program access metadata from its Cargo package?

前端 未结 2 1812
南旧
南旧 2020-12-04 06:56

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 standa

2条回答
  •  一向
    一向 (楼主)
    2020-12-04 07:27

    The built-crate helps with serializing a lot of Cargo's environment without all the boilerplate.

提交回复
热议问题