GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Elixir bindings by joelpaulkoch · Pull Request #151 · asg017/sqlite-vec

Conversation

@joelpaulkoch

@joelpaulkoch joelpaulkoch commented Dec 7, 2024

Copy link
Copy Markdown

This PR moves the sqlite_vec package into this repository.

Here the remaining open points:

License

I'm guessing you would want to copy the Apache and MIT license from the root repository? In any case, after updating the license, we must make sure it's included in the published package on hex.

Transfer ownership of the package on hex

I can transfer the ownership of the package on hex.pm. If you give me the go, I'll do that with this user.

CI

I've included my github workflows file, not sure what you want to do with that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
joelpaulkoch added 3 commits December 7, 2024 16:28
@joelpaulkoch
Add elixir bindings
316bd69
@joelpaulkoch
Add elixir example
79c370c
@joelpaulkoch
Pull sqlite_vec from hex in notebooks
6866a5e
@MiraiTunga

MiraiTunga commented Sep 28, 2025

Copy link
Copy Markdown

Can this be merged?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joelpaulkoch

joelpaulkoch commented Sep 29, 2025

Copy link
Copy Markdown
Author

You can use the package as git dependency in mix: https://github.com/joelpaulkoch/sqlite_vec.

I want to refactor the PR so that it doesn't depend on octo_fetch. Instead we can use elixir_make, this way we don't have a runtime dependency and it will integrate better with the ecosystem (cross compilling with burrito, probably also nerves).
I expect this to work pretty good given that we can just reuse the existing Makefile, sqlite-vec.c and sqlite-vec.h.

MiraiTunga reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@asg017

asg017 commented Sep 29, 2025

Copy link
Copy Markdown
Owner

@joelpaulkoch lmk if I can help with that in anyway! A no-dep Makefile option would be awesome

MiraiTunga reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joelpaulkoch added 6 commits September 30, 2025 23:37
@joelpaulkoch
Remove octo_fetch
6a4b640
@joelpaulkoch
Remove mix_test_watch and doctest_formatter
e7cde7a
@joelpaulkoch
Compile with elixir_make
b9f5668
@joelpaulkoch
Make prefix overridable
d15e5d4
@joelpaulkoch
Update readme
ad9528f
@joelpaulkoch
Add publish script to replace symlinks with content
1f9a097
@joelpaulkoch

joelpaulkoch commented Oct 2, 2025

Copy link
Copy Markdown
Author

So, here's the updated PR.
A few notable points:

  1. it's not no-dep, but elixir_make is a compile time only dependency, and pretty established (as you can see by the fact that it's in the elixir-lang org on github). It's for instance used by burrito to detect a native library and recompile it when doing cross compilation (that is to say, there are benefits to have elixir_make as dependency compared to manually calling make).
  2. To compile the library from the Makefile, we must have Makefile, VERSION, sqlite-vec.c and sqlite-vec.h.tmpl as part of the published package. I solved that by adding symlinks and a publish script which replaces the symlinks with the actual files before publishing the package.
  3. I had to update the Makefile so that the install prefix can be set from env.
  4. This approach requires that users have make and a c compiler available. There is the concept of precompilers in elixir_make that check for existing binaries to download before compilation but I think it's not quite fitting the scenario here where the native library is not only made for Elixir. So maybe we can later add a step to download from github releases and make the compilation with make and c compiler optional.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@asg017

asg017 commented Oct 2, 2025

Copy link
Copy Markdown
Owner

Thank you @joelpaulkoch for your hard work here!

One ask — instead of relying on the Makefile + sqlite-vec.h.tmpl from this project, can we instead use the "amalgamation" build, that has pre-processed sqlite-vec.c and sqlite-vec.h files? Here's a sample: https://github.com/asg017/sqlite-vec/releases/download/v0.1.7-alpha.2/sqlite-vec-0.1.7-alpha.2-amalgamation.zip

Hopefully that will mean we don't need to include Makefile/VERSION in here, and maybe avoid the need for the symlinking

Also — do you have a link to docs that talk about the "precompilers" for elixir make? I ask because the sqlite-dist project is for pre-compiling/bundling SQLite extensions for various platforms, so it might be possible to include elixir_make precompiled support in there (which sqlite-vec uses in it's publishing process)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joelpaulkoch

joelpaulkoch commented Oct 8, 2025

Copy link
Copy Markdown
Author

Regarding amalgamation, that would mean we would include those preprocessed files in the package (tarball), right? Then have a simple Makefile to build from sqlite-vec.c and sqlite-vec.h, and no symlinks.
Then, the publishing process would require to first build the amalgamation, then proceed with the Elixir package. I think that would work and avoid symlinking.

Regarding precompilers in elixir_make, it's mentioned here in the docs. If I get it right, it's just an integrated way to compile the native library of an Elixir package and have a known URL for the artifact so that you can first try to download instead of compiling.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@joelpaulkoch @MiraiTunga @asg017
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.