Commit 92c26ec
feat(rust/core): add function to load driver manifests (#3099)
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_name` along
with constants for the `LoadFlags` to 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_lib` which expects an env var
`ADBC_DRIVER_MANAGER_TEST_LIB` to be set, just like the C++ driver
manager tests, to the path for an adbc library to load. And
`driver_manager_test_manifest_user` which controls whether the test that
interacts with the user's config directory should be run or not.
---------
Co-authored-by: David Li <[email protected]>
Co-authored-by: Bryce Mecum <[email protected]>
Co-authored-by: Matthijs Brobbel <[email protected]>
Co-authored-by: eitsupi <[email protected]>1 parent bcd2d75 commit 92c26ec
File tree
6 files changed
+1335
-391
lines changed- .github/workflows
- ci/scripts
- rust
- core
- src
6 files changed
+1335
-391
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
0 commit comments