Lowest-abstraction level for the Substrate runtime: just exports useful primitives from std or core/alloc to be used with any code that depends on the runtime.
//! Set a nightly feature
userustc_version::{version, version_meta, Channel};fnmain(){// Assert we haven't traveled back in time
assert!(version().unwrap().major >=1);// Set cfg flags depending on release channel
ifletChannel::Nightly =version_meta().unwrap().channel {println!("cargo:rustc-cfg=feature=\"nightly\"");}}