sdk/core/azure_core/build.rs (8 lines of code) (raw):
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use rustc_version::version;
fn main() {
let version = match version() {
Ok(version) => version.to_string(),
Err(_) => "unknown".to_owned(),
};
println!("cargo:rustc-env=AZSDK_RUSTC_VERSION={version}");
}