wright 0.10.1

The wright programming language compiler and tooling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Build script for wright.
//! This is used for capturing build environment info which is used at runtime.

use rustc_version::{version_meta, Channel};

fn main() {
    // Set a cfg flag if we're on the nightly channel.

    println!("cargo::rustc-check-cfg=cfg(CHANNEL_NIGHTLY)");
    if version_meta().unwrap().channel == Channel::Nightly {
        println!("cargo:rustc-cfg=CHANNEL_NIGHTLY");
    }

    // Save build info.
    // See https://docs.rs/built/0.7.4/built/index.html.
    built::write_built_file().expect("Failed to acquire build-time information");
}