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

Fix rust CI on windows #2591

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ jobs:
working-directory: tools/rust_api
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
set OPENSSL_DIR=C:\Program Files\OpenSSL-Win64
set KUZU_TESTING=1
set CFLAGS=/MDd
set CXXFLAGS=/MDd /std:c++20
Expand Down
2 changes: 0 additions & 2 deletions tools/rust_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ arrow = {version="43", optional=true, default-features=false, features=["ffi"]}
cxx-build = "1.0"
num_cpus = "1.0"
cmake = "0.1"
[target.'cfg(windows)'.build-dependencies]
which = "4"

[dev-dependencies]
tempfile = "3"
Expand Down
37 changes: 0 additions & 37 deletions tools/rust_api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,6 @@ fn link_mode() -> &'static str {
}
}

fn find_openssl_windows() {
// Find openssl library relative to the path of the openssl executable
// Or fall back to OPENSSL_DIR
#[cfg(windows)]
{
let openssl_dir = if let Ok(mut path) = which::which("openssl") {
path.pop();
path.pop();
path
} else if let Ok(path) = env::var("OPENSSL_CONF") {
Path::new(&path)
.parent()
.unwrap()
.parent()
.unwrap()
.to_path_buf()
} else if let Ok(path) = env::var("OPENSSL_DIR") {
Path::new(&path).to_path_buf()
} else {
panic!(
"OPENSSL_DIR must be set if the openssl library cannot be found \
using the path of the openssl executable"
)
};
println!(
"cargo:rustc-link-search=native={}/lib",
openssl_dir.display()
);
}
}

fn get_target() -> String {
if cfg!(windows) && std::env::var("CXXFLAGS").is_err() {
"release".to_string()
Expand All @@ -65,12 +34,6 @@ fn link_libraries() {
println!("cargo:rustc-link-lib=dylib=stdc++");
}

if env::var("KUZU_TESTING").is_ok() && cfg!(windows) {
find_openssl_windows();
println!("cargo:rustc-link-lib=dylib=libssl");
println!("cargo:rustc-link-lib=dylib=libcrypto");
}

println!("cargo:rustc-link-lib=static=utf8proc");
println!("cargo:rustc-link-lib=static=antlr4_cypher");
println!("cargo:rustc-link-lib=static=antlr4_runtime");
Expand Down