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

Initial pass on loadable rust extensions #658

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

PThorpe92
Copy link
Contributor

@PThorpe92 PThorpe92 commented Jan 12, 2025

This PR adds the start of an implementation of an extension library for limbo so users can write extensions in rust, that can be loaded at runtime with the .load cli command.

The existing "ExtensionFunc" uuid, has been replaced with the first complete limbo extension in extensions/uuid

image

image

There is still considerable work to do on this, as this only implements scalar functions, but this PR is already plenty big enough.

Design + implementation comments or suggestions would be appreciated 👍

I tried out using abi_stable, so that trait objects and other goodies could be used across FFI bounds, but to be honest I didn't find it too much better than this. I personally haven't done a whole lot with FFI, or anything at all linking dynamically in Rust, so if there is something I seem to be missing here, please let me know.

I added some tests, similar to how shell-tests are setup.

If anyone can test this on other platforms, that would be helpful as well as I am limited to x86_64 linux here

@PThorpe92 PThorpe92 marked this pull request as draft January 12, 2025 04:10
@PThorpe92 PThorpe92 marked this pull request as ready for review January 12, 2025 21:36
@PThorpe92 PThorpe92 force-pushed the load_extensions branch 4 times, most recently from 9acefb8 to ffcbf9c Compare January 13, 2025 01:40
@PThorpe92
Copy link
Contributor Author

This likely closes #637 too

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.

2 participants