Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force release #60

Merged
merged 11 commits into from
Nov 29, 2024
26 changes: 26 additions & 0 deletions modules/core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ fn unpack_onnx() -> std::io::Result<()> {
let lib_path = lib_path.to_str().unwrap();
println!("Surrealml Core Debug: lib_path={}", lib_path);

// Check if the path exists
if fs::metadata(lib_path).is_ok() {
println!("Surrealml Core Debug: lib_path exists");
} else {
println!("Surrealml Core Debug: lib_path does not exist");
// Extract the directory path
if let Some(parent) = std::path::Path::new(lib_path).parent() {
// Print the contents of the directory
match fs::read_dir(parent) {
Ok(entries) => {
println!("Surrealml Core Debug: content of directory {}", parent.display());
for entry in entries {
if let Ok(entry) = entry {
println!("{}", entry.path().display());
}
}
}
Err(e) => {
println!("Surrealml Core Debug: Failed to read directory {}: {}", parent.display(), e);
}
}
} else {
println!("Surrealml Core Debug: Could not determine the parent directory of the path.");
}
}

// put it next to the file of the embedding
let destination = Path::new(target_lib);
fs::copy(lib_path, destination)?;
Expand Down
Loading