Skip to content

docs: add Elixir page (exqlite run-time loading + static compilation for iOS) - #317

Open
AlanMcCann wants to merge 1 commit into
asg017:mainfrom
AlanMcCann:elixir-docs
Open

docs: add Elixir page (exqlite run-time loading + static compilation for iOS)#317
AlanMcCann wants to merge 1 commit into
asg017:mainfrom
AlanMcCann:elixir-docs

Conversation

@AlanMcCann

Copy link
Copy Markdown

Adds a site/using/elixir.md page following the existing per-language format, plus the sidebar entry.

Covers:

  • Run-time loading through exqlite (enable_load_extension + load_extension) and per-connection loading via Ecto's load_extensions config.
  • Static compilation into the exqlite NIF via SQLITE_EXTRA_INIT + sqlite3_auto_extension — the only option on iOS, where dynamic code loading is forbidden. References the EXQLITE_EXTRA_SRC hook proposed in Add EXQLITE_EXTRA_SRC: statically compile SQLite extensions into the NIF elixir-sqlite/exqlite#355 and notes the two-line Makefile patch as the interim.
  • Packing float lists into the little-endian float32 BLOB format (the Elixir equivalent of the .pack("f*") snippet on the Ruby page).

Everything in the page is verified by execution in a production Elixir app: sqlite-vec v0.1.9 statically compiled into exqlite's bundled SQLite (3.51.3 and 3.53.4), known-answer cosine checks (vec_distance_cosine(vec_f32('[1,0]'), vec_f32('[0,1]')) = 1.0), including an iOS device-SDK static archive with execution verified in the simulator.

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