odra-schema 2.4.0

Generates Casper Contract Schema from Odra contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! This build script is used to set the `RUSTC_VERSION` environment variable to the current Rust.
use std::process::Command;

fn main() {
    // Get the Rust version
    let output = Command::new("rustc")
        .arg("--version")
        .output()
        .expect("Failed to get Rust version");

    let rust_version =
        String::from_utf8(output.stdout).expect("Failed to convert Rust version to string");

    // Set the CARGO_PKG_RUST_VERSION variable
    println!("cargo:rustc-env=RUSTC_VERSION={}", rust_version);
}