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

Rust API on Windows #1703

Merged
merged 1 commit into from
Jun 26, 2023
Merged

Rust API on Windows #1703

merged 1 commit into from
Jun 26, 2023

Conversation

benjaminwinger
Copy link
Collaborator

I've managed to get rust working on Windows, with the exception that compiling against the debug version doesn't work very well, so I've set it to link against the release version in both debug and release mode on Windows (it only works if you override the CFLAGS/CXXFLAGS environment variables, but it's not sufficient to do that in build.rs since it has to also affect one of the dependencies).

@benjaminwinger benjaminwinger force-pushed the rust-api-windows branch 8 times, most recently from 87b39fc to dd4ef58 Compare June 22, 2023 19:01
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.08 🎉

Comparison is base (75617bb) 91.21% compared to head (ac9250f) 91.29%.

❗ Current head ac9250f differs from pull request most recent head 9d6d9a2. Consider uploading reports for the commit 9d6d9a2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1703      +/-   ##
==========================================
+ Coverage   91.21%   91.29%   +0.08%     
==========================================
  Files         737      740       +3     
  Lines       26969    27160     +191     
==========================================
+ Hits        24600    24797     +197     
+ Misses       2369     2363       -6     
Impacted Files Coverage Δ
src/include/common/types/value.h 100.00% <ø> (ø)
src/include/main/connection.h 100.00% <ø> (ø)
src/include/main/query_result.h 100.00% <ø> (ø)
src/include/processor/result/flat_tuple.h 100.00% <ø> (ø)
src/common/types/value.cpp 91.28% <100.00%> (ø)
src/main/connection.cpp 94.40% <100.00%> (ø)
src/main/query_result.cpp 76.97% <100.00%> (ø)
src/processor/result/flat_tuple.cpp 90.90% <100.00%> (ø)

... and 40 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@benjaminwinger benjaminwinger force-pushed the rust-api-windows branch 3 times, most recently from 88f174a to e1d0e2b Compare June 22, 2023 20:29
@benjaminwinger
Copy link
Collaborator Author

I ran into the same issue with arrow and openssl that I did with the Linux tests. It seems that the arrow_bundled_dependencies library will use openssl if it finds it on your system, regardless of whether or not ARROW_USE_OPENSSL is enabled (I'm not sure why; as far as I can tell parquet is compiling the nossl version of their encryption_internal code).

I've set it up to link against openssl when running the tests on windows, but it does have more difficulty finding it than on Linux. Adding the openssl-sys crate as a dependency on Windows helps with finding the library, but you either need vcpkg to detect it (something the openssl-sys error message mentions), or to manually set OPENSSL_DIR (which I've included in the github workflow). I might have to look into how using vcpkg works, but if we're relying on OPENSSL_DIR it might make more sense to just add ${OPENSSL_DIR}/lib to the linker search paths ourselves since the openssl rust bindings from openssl-sys aren't needed.

@benjaminwinger benjaminwinger force-pushed the rust-api-windows branch 2 times, most recently from 7a22737 to ac9250f Compare June 23, 2023 16:31
Currently building in release mode works fine, but debug mode requires
overriding CFLAGS and CXXFLAGS to include /MDd, which is done in the
rusttest makefile target.

Also made the number of threads passed to make in build.rs configurable
@andyfengHKU andyfengHKU merged commit ddb531f into master Jun 26, 2023
7 checks passed
@andyfengHKU andyfengHKU deleted the rust-api-windows branch June 26, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants