From 521c248079dd3a60240b1bd651e32ff8b61b5d05 Mon Sep 17 00:00:00 2001 From: Alok Priyadarshi Date: Fri, 6 Feb 2026 15:25:12 -0800 Subject: [PATCH] fix: respect RUSTC environment variable if set Fixes #18 --- build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 20cf4a0..a03b8b4 100644 --- a/build.rs +++ b/build.rs @@ -25,7 +25,8 @@ fn check_func(function_name: &str) -> bool { writeln!(&mut test_file, "}}").unwrap(); } - let output = Command::new("rustc"). + let rustc = env::var_os("RUSTC").unwrap_or_else(|| "rustc".into()); + let output = Command::new(&rustc). arg(&test_file_name). arg("--out-dir").arg(&out_dir). arg("-l").arg("udev").