Expand description
This crate provides a simple API for detecting the rustc compiler version.
It is primarily intended for build scripts, but is also usable at runtime.
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
Datetype used for differentiating nightly versions of rust. - version
- Defines the rust version types.
Macros§
- date
Deprecated - Declare a
Dateusing the YYYY-MM-DD format (ISO 8601). - maybe_
const_ fn - Mark a function as
constif acfg!(...)attribute evaluates to true. - spec
Deprecated - Specify a stable version (a
StableVersionSpec).
Constants§
- RUST_
VERSION - The detected rust compiler version.