diff --git a/rust/onnxruntime-sys/build.rs b/rust/onnxruntime-sys/build.rs index 82d1e4278015c..c503e48664786 100644 --- a/rust/onnxruntime-sys/build.rs +++ b/rust/onnxruntime-sys/build.rs @@ -13,7 +13,7 @@ use std::{ /// WARNING: If version is changed, bindings for all platforms will have to be re-generated. /// To do so, run this: /// cargo build --package onnxruntime-sys --features generate-bindings -const ORT_VERSION: &str = include_str!("../../VERSION_NUMBER"); +const ORT_VERSION: &str = "1.14.1"; /// Base Url from which to download pre-built releases/ const ORT_RELEASE_BASE_URL: &str = "https://github.com/microsoft/onnxruntime/releases/download"; @@ -71,9 +71,9 @@ fn generate_bindings(include_dir: &Path) { ]; let path = include_dir - .join("onnxruntime") - .join("core") - .join("session") + //.join("onnxruntime") + //.join("core") + //.join("session") .join("onnxruntime_c_api.h"); // The bindgen::Builder is the main entry point @@ -401,7 +401,7 @@ fn prepare_libort_dir() -> PathBuf { strategy.as_ref().map_or_else(|_| "unknown", String::as_str) ); match strategy.as_ref().map(String::as_str) { - Ok("download") => prepare_libort_dir_prebuilt(), + Ok("download") | Err(_) => prepare_libort_dir_prebuilt(), Ok("system") => PathBuf::from(match env::var(ORT_RUST_ENV_SYSTEM_LIB_LOCATION) { Ok(p) => p, Err(e) => { @@ -411,7 +411,10 @@ fn prepare_libort_dir() -> PathBuf { ); } }), - Ok("compile") | Err(_) => prepare_libort_dir_compiled(), + Ok("compile") => panic!( + "`ORT_RUST_STRATEGY=compile` is currently unavailable. See \ + https://github.com/VOICEVOX/onnxruntime/pull/2#discussion_r1150638175", + ), _ => panic!("Unknown value for {:?}", ORT_RUST_ENV_STRATEGY), } }