mirror of
https://github.com/tlsnotary/ws_stream_wasm.git
synced 2026-01-08 20:47:57 -05:00
17 lines
440 B
Rust
17 lines
440 B
Rust
// Detect the rustc channel
|
|
//
|
|
use rustc_version::{ version_meta, Channel };
|
|
|
|
fn main()
|
|
{
|
|
// Set cfg flags depending on release channel
|
|
//
|
|
match version_meta().unwrap().channel
|
|
{
|
|
Channel::Stable => println!( "cargo:rustc-cfg=stable" ),
|
|
Channel::Beta => println!( "cargo:rustc-cfg=beta" ),
|
|
Channel::Nightly => println!( "cargo:rustc-cfg=nightly" ),
|
|
Channel::Dev => println!( "cargo:rustc-cfg=rustc_dev" ),
|
|
}
|
|
}
|