From 6c0be6913dd0bcbb7e17a3e2a4daa45fcc8f5103 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 30 Jan 2026 00:02:36 +0500 Subject: warn if pathfinder is running without optimizations, and other minor fixes --- azalea/build.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'azalea/build.rs') diff --git a/azalea/build.rs b/azalea/build.rs index faed1365..9dd6b738 100644 --- a/azalea/build.rs +++ b/azalea/build.rs @@ -1,6 +1,17 @@ use std::{env, process::Command}; fn main() { + check_nightly(); + + // save the optimization level, used by the pathfinder to warn if optimizations + // are off + println!( + "cargo::rustc-env=OPT_LEVEL={}", + env::var("OPT_LEVEL").unwrap() + ); +} + +fn check_nightly() { // If using `rustup`, check the toolchain via `RUSTUP_TOOLCHAIN` if let Ok(toolchain) = env::var("RUSTUP_TOOLCHAIN") { if toolchain.contains("nightly") { -- cgit v1.2.3