rustversion_detect/
lib.rs1#![cfg_attr(not(test), no_std)]
17#![deny(missing_docs)]
18
19#[macro_use]
20mod macros;
21pub mod date;
22pub mod version;
23
24pub use crate::date::Date;
25pub use crate::version::{Channel, RustVersion, StableVersionSpec};
26
27pub const RUST_VERSION: RustVersion = self::detected::DETECTED_VERSION;
29
30#[allow(unused_imports)]
32mod detected {
33 use crate::date::Date;
34 use crate::version::Channel::*;
35 use crate::version::RustVersion as Version;
36
37 #[cfg(not(host_os = "windows"))]
38 pub const DETECTED_VERSION: Version = include!(concat!(env!("OUT_DIR"), "/version.expr"));
39
40 #[cfg(host_os = "windows")]
41 pub const DETECTED_VERSION: Version = include!(concat!(env!("OUT_DIR"), "\\version.expr"));
42}