no-std-compat2 0.4.5

A `#![no_std]` compatibility layer that will make porting your crate to no_std *easy*. This fork fixes build upto Rust Edition 2021
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use rustc_version::{version_meta, Channel};

fn main() {
    // Set cfg flags depending on release channel
    let channel = match version_meta().unwrap().channel {
        Channel::Stable => "CHANNEL_STABLE",
        Channel::Beta => "CHANNEL_BETA",
        Channel::Nightly => "CHANNEL_NIGHTLY",
        Channel::Dev => "CHANNEL_DEV",
    };
    println!("cargo:rustc-cfg={}", channel)
}