-
Notifications
You must be signed in to change notification settings - Fork 87
feat(ffi): added default-engine-rustls feature and extern "C" for .h file #1023
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1023 +/- ##
=======================================
Coverage 82.97% 82.97%
=======================================
Files 93 93
Lines 21979 21979
Branches 21979 21979
=======================================
Hits 18238 18238
Misses 2786 2786
Partials 955 955 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Isn't the entire name space surrounded in |
It is with this change. It wasn't previously. The ffi crate also generates a .hpp file for C++. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the core kernel crate we get away with defining a 'default-engine-base' feature - I wonder if we could do something similar here to avoid having to check both features at each cfg
?
I considered it after looking at the kernel config. The difference between the two is that the kernel base feature actually does something. In the ffi crate the features would look like
It saves us verbosity, but it doesn't provide any real value, and, if someone were to enable it without one of the corresponding engine features, the code wouldn't compile.
It's redundant, but it doesn't cause surprise failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thanks! Just a small nit. I can merge once that's addressed
ffi/Cargo.toml
Outdated
default-engine-rustls = ["delta_kernel/default-engine-rustls", "default-engine-base"] | ||
|
||
# this is an 'internal' feature flag which has all the shared bits from default-engine and | ||
# default-engine-rustls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we add a comment that the check in kernel/lib.rs that you've enabled one of default-engine
or default-engine-rustls
will ensure that we don't just enable default-engine-base
here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed you meant adding a comment referencing the check in kernel/lib.rs
to the Cargo.toml
for ffi. That's what I did. Let me know if that was what you were getting at.
d223638
to
e46526b
Compare
9039a8a
to
ec39d6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Thanks for taking this on!
This PR adds a feature
default-engine-rustls
to allow users to use the feature in the kernel. Additionally, it addscpp_compat = true
to thecbindgen.toml
file so that it will add a section to add theextern "C"
wrapper.What changes are proposed in this pull request?
delta_kernel_ffi.h
to include c++ compatibility to that it will includeextern "C"
so that code generation will appropriately not try to use mangled method names.delta-engine-rustls
to the ffi project in order to use the same feature from the kernel.How was this change tested?
Tested against the dotnet implementation of delta lake.