Skip to content

fix(rust/driver_manager): use platform library filenames in search paths#4155

Open
VersusFacit wants to merge 1 commit intoapache:mainfrom
VersusFacit:fix/rust-driver-manager-local-search-filename
Open

fix(rust/driver_manager): use platform library filenames in search paths#4155
VersusFacit wants to merge 1 commit intoapache:mainfrom
VersusFacit:fix/rust-driver-manager-local-search-filename

Conversation

@VersusFacit
Copy link
Copy Markdown
Contributor

@VersusFacit VersusFacit commented Mar 28, 2026

Summary

Fix Rust driver_manager search-path loading for bare driver names.

This came up while testing local ADBC driver development through additional search paths. We've used this plenty over the past year or so. However, now search_path_list() in rust/driver_manager/src/search.rs was joining a bare driver name like adbc_driver_bigquery directly into the search directory and attempting to load that path as-is. On macOS, that meant trying /path/to/adbc_driver_bigquery instead of /path/to/libadbc_driver_bigquery.dylib.

This change applies libloading::library_filename(...) before loading from additional search paths so path-based search matches the existing by-name loading behavior.

This also, I believe, aligns the Rust behavior with the existing C++ driver-manager search-path logic in c/driver_manager/adbc_driver_manager_driver_loading.cc, where ManagedLibrary::SearchPathsForDriver() removes the manifest suffix and relies on Load(...) to add the platform library suffix during path-based search.

If there's a different intent for this package, do let me know. Happy to iterate if required 🙏

Testing

cargo +1.86 test -p adbc_driver_manager test_load_additional_path_with_platform_library_filename

I smoke tested this with my local project which was looking for the extension-less filename, then once more began to find my drivers built in arrow-adbc's go subrepo.

@VersusFacit VersusFacit requested a review from wjones127 as a code owner March 28, 2026 07:35
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.

1 participant