Skip to content

Commit

Permalink
Update build.rs
Browse files Browse the repository at this point in the history
Bench: 1736583
  • Loading branch information
codedeliveryservice committed Apr 16, 2024
1 parent 384e283 commit 92e29ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ fn main() {
}

fn generate_model_env() {
println!("cargo:warning=EVALFILE: '{:?}'", env::var("EVALFILE"));

let path = env::var("EVALFILE").unwrap_or_else(|_| {
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let path = path.join("networks").join("model.nnue");
path.to_str().unwrap().to_string()
std::fs::canonicalize(path).unwrap().to_str().unwrap().to_string()
});

println!("cargo:rustc-env=MODEL={path}");
}

Expand Down

0 comments on commit 92e29ee

Please sign in to comment.