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

[release/8.0-staging] Improve LoadExtension to work correctly with dotnet run and lib* named libs #35718

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

roji
Copy link
Member

@roji roji commented Mar 3, 2025

Backport of #35617 (see #35717 for 9.0 backport PR)
Closes #35715

Description

This improves the extension loading logic of Microsoft.Data.Sqlite to attempt to load native extensions from additional standard native library locations. This is particularly important to SQLite vector database support, which will become our first getting started sample for vector databases with Microsoft.Extensions.VectorData etc. This is an important part of the .NET Intelligent Apps story.

Customer impact

This enables nuget packages to bundle extension native binaries (e.g. sqlite_vec), and for SQLite to just pick them up without any additional obscure handling of native library loading paths.

How found

Path of SQLite vector data investigative work by @krwq.

Regression

No

Testing

Manual testing performed.

Risk

Very low - only adds additional attempts to load from. Quirked.

/cc @krwq

…d libs

* Improve LoadExtension to work correctly with dotnet run and lib packages
* Use [] instead of Array.Empty

(cherry picked from commit b1d34dc)
@roji roji force-pushed the sqlite-load-extension-8 branch from dada4a1 to 43c33dc Compare March 3, 2025 22:46
@roji roji enabled auto-merge (squash) March 3, 2025 22:46
@roji roji merged commit e52e0fb into dotnet:release/8.0-staging Mar 4, 2025
7 checks passed
@roji roji deleted the sqlite-load-extension-8 branch March 4, 2025 01:08
@roji roji modified the milestone: 8.0.x Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants