Crate rustversion_detect

Crate rustversion_detect 

Source
Expand description

This crate provides a simple API for detecting the rustc compiler version.

It is only intended for use at build time, because it requires executing the rustc compiler.

The implementation is forked from the rustversion crate, but with proc-macro code removed.

§Dependency

Add the following to your build script:

[build-dependencies]
rustversion-detect = "0.1"

Re-exports§

pub use crate::date::Date;
pub use crate::version::Channel;
pub use crate::version::RustVersion;
pub use crate::version::StableVersionSpec;

Modules§

date
Contains a basic Date type used for differentiating nightly versions of rust.
version
Defines the rust version types.

Macros§

maybe_const_fnDeprecated
Mark a function as const if a cfg!(...) attribute evaluates to true.

Structs§

VersionDetectionError
Indicates failure to detect the compiler’s rust version.

Functions§

detect_version
Detect the current version by executing rustc.