this-crate 0.1.0

A utility crate for working with crate version information
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented3 out of 3 items with examples
  • Size
  • Source code size: 2.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 544.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Phala-Network/phala-blockchain
    368 162 80
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kvinwang

This crate provides utility macros to work with crate version information.

The two main macros are version_str! and version_tuple!. These macros return the crate version in string format and as a tuple of three u16 integers, respectively.

Examples

use this_crate::{version_str, version_tuple};
let version = version_str!();
println!("The version is: {}", version);

let (major, minor, patch) = version_tuple!();
println!("The version is: {}.{}.{}", major, minor, patch);

no_std

This crate is no_std compatible, so it can be used in environments without the Rust standard library.