| Crates.io | auto-version |
| lib.rs | auto-version |
| version | 0.2.1 |
| created_at | 2021-06-19 08:06:57.950727+00 |
| updated_at | 2021-06-19 11:24:48.668658+00 |
| description | Automatically add -v and --version output to your rust executables |
| homepage | |
| repository | https://github.com/dominusmi/auto-version |
| max_upload_size | |
| id | 412032 |
| size | 9,446 |
-v, -V, and --version to your binariesThis crate contains an attribute macro, auto_version, which when applied to your
main function, will generate the output for binary -v or binary --version:
$ ./binary -v
$ 0.1.0
$ ./binary --version
$ 0.1.0
use auto_version::auto_version;
#[auto_version]
fn main() {
// executed code
}
⚠️ Only works with cargo ⚠️
In the case where the code is not compiled with cargo, the version will be replaced with the message "`auto_version` macro only works for projects compiled with cargo".