mesa-dev 1.8.0

Rust SDK for the mesa.dev API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(missing_docs)]

use std::process::Command;

fn main() {
    let rustc_version = Command::new("rustc")
        .arg("--version")
        .output()
        .ok()
        .and_then(|o| String::from_utf8(o.stdout).ok())
        .and_then(|s| {
            // "rustc 1.82.0 (..." -> "1.82.0"
            s.split_whitespace().nth(1).map(String::from)
        })
        .unwrap_or_else(|| "unknown".to_string());

    println!("cargo:rustc-env=MESA_RUSTC_VERSION={rustc_version}");
}