compile-time

Crates.iocompile-time
lib.rscompile-time
version0.2.0
sourcesrc
created_at2023-06-30 03:49:32.766172
updated_at2023-07-01 19:57:51.375622
descriptionMacros for getting compile time information.
homepagehttps://github.com/reitermarkus/compile-time-rs
repositoryhttps://github.com/reitermarkus/compile-time-rs
max_upload_size
id904067
size14,025
Markus Reiter (reitermarkus)

documentation

https://docs.rs/compile-time

README

compile-time

Crates.io Documentation

This crate provides macros for getting compile time information.

You can get the compile time either as time::Date, time::Time, time::OffsetDateTime, string, or UNIX timestamp.

You can get the Rust compiler version either as semver::Version or string, and the individual version parts as integer literals or strings, respectively.

Example

let compile_datetime = compile_time::datetime_str!();
let rustc_version = compile_time::rustc_version_str!();

println!("Compiled using Rust {rustc_version} on {compile_datetime}.");
Commit count: 8

cargo fmt