-
Notifications
You must be signed in to change notification settings - Fork 37
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
Use from Python sqlite
/ creating a standalone libsqlite3.so
#63
Comments
Thanks for bringing up the unikernel use case!
I wonder what kind of dynamic linking does this unikernel support? It's hard to imagine a case where loading |
Excitingly, I was wrong about So, on the Python |
Even more excitingly, I guess I could amend/reword this issue to be specifically about building a standalone |
Also, BTW, I had to run |
Not sure why the shared library has executable stack enabled - maybe related to the Rust->C linking process? Fixed by adding a linker option to force |
Currently this should work if you link To build everything into one library though things start to become a bit complex - I don't know of a way to override ELF symbols at build time (unless we post-process the ELF with custom tools)? |
Released v0.1.18 with |
Thanks for those changes! I'll test out the new patched library shortly. One thing I have been thinking about: in terms of the library name, maybe it should be For my current use-case w/Python, I would take that file and rename it to |
I am happy to report that the patched lib works great! No Not sure if I missed a step in building (I was manually following the "Build (patched libsqlite3)" steps in |
Also, I think "Python" could be added to the "App and Library Compatibility Table"; I've successfully used Python 3.10 -- via the stdlib's |
Thanks for the testing! Updated the docs. |
A standalone |
This is a very exciting project! sqlite is a great interface, and FoundationDB is a great DB.
I'd like to use mvsqlite from Python; it doesn't have to be via the stdlib's
import sqlite
(i.e. if a different 3rd-party library makes the integration easier), but FUSE is not an option in the context I am using (a unikernel). In fact, even if theLD_PRELOAD
approach was usable by Python libraries, this unikernel context does not support that. For my use-case, I'd only be usingmvsqlite
and I'd be OK if the defaultsqlite
library was overridden so that all sqlite connections usemvsqlite
and the regular FS-based sqlite was not available.So, I'm thinking I'd need a different integration method, which would be along the lines of creating a standalone
libsqlite3.so
which can override the default system lib. I'm not quite sure how to build something like that, but I could also see it being helpful for other use-cases which aremvsqlite
-only and want to avoidLD_PRELOAD
.Does this make sense as a supported use-case? I'm not sure how to do it; I can poke around at modifying the
mvsqlite-preload/Makefile
for my own purposes, but it could be nice to have support for such an integration method in the repo.The text was updated successfully, but these errors were encountered: