#compile #compile-time #pkg #date #fetching #package #date-time

macro pkg_compile_time

Provides macros for fetching the package's compile date and time

3 releases

0.1.3 Oct 9, 2020
0.1.2 Oct 7, 2020
0.1.1 Oct 2, 2020

#19 in #pkg

MIT license

3KB

pkg_compile_time

一个返回编译日期、时间的过程宏。

用法

use pkg_compile_time::*;

输出编译日期:

println!("Compile date is: {}", pkg_compile_date!());

输出编译时间:

println!("Compile time is: {}", pkg_compile_time!());

lib.rs:

Provides macros for fetching the package's compile date and time.

Example

use pkg_compile_time::*;
fn main(){
    println!("Compile date is: {}", pkg_compile_date!());
    println!("Compile time is: {}", pkg_compile_time!());
}

The Output is:

Compile date is: 2020-10-01
Compile time is: 19:58:49

Dependencies

~2.5MB
~53K SLoC