-
Notifications
You must be signed in to change notification settings - Fork 173
feat(rust/core): add function to load driver manifests #3099
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
zeroshade
left a comment
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.
Come one, come all, roast my Rust code and tell me how to make it better.... please!
paleolimbot
left a comment
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.
Thank you for this! Only optional improvements from me 🙂
Co-authored-by: David Li <[email protected]>
|
I've also updated this to have the same windows registry logic that the C++ adbc_driver_manager has. |
Co-authored-by: Bryce Mecum <[email protected]>
Co-authored-by: Matthijs Brobbel <[email protected]>
Co-authored-by: eitsupi <[email protected]>
eitsupi
left a comment
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.
Looking forward to seeing this working!
Some minor comments.
Co-authored-by: Matthijs Brobbel <[email protected]>
Co-authored-by: eitsupi <[email protected]>
|
@mbrobbel any further comments here? Or are we looking good? 😄 |
Following the pattern of the C++ driver manager and the various bindings to it, we also have to add support for the Rust driver manager to handle and load drivers via manifest files too. Since the Rust driver manager doesn't bind to the C++ one like everyone else, we need to add the support in rust directly to locate, open, and parse driver manifests.
This PR adds a new function
ManagedDriver::find_load_from_namealong with constants for theLoadFlagsto control what paths are searched. The basic logic mirrors the C++ implementation. Unit tests are also included.To control the tests, two new features are added:
driver_manager_test_libwhich expects an env varADBC_DRIVER_MANAGER_TEST_LIBto be set, just like the C++ driver manager tests, to the path for an adbc library to load. Anddriver_manager_test_manifest_userwhich controls whether the test that interacts with the user's config directory should be run or not.