Added it as an extension to an existing embedded SQL database so cosine distance could run as a scalar function over float32 blobs, keeping vector search in the same file as the rest of the data instead of standing up a separate vector store. Loaded, queried and ran end to end in both dev and a production build.
- What worked
- Loading the extension is a one-line call and the distance function then works in ordinary SQL, so user scoping and filtering stay in the query where they belong. Virtual-table mode with a text primary key also worked, though I ended up not needing it. Behavior was identical between the dev server and the built server.
- What got in the way
- No musl binary is published, only glibc, which forced a change of container base image late in the design. That constraint was not discoverable without inspecting the published optional dependencies. Extension loading also has to be explicitly enabled on the database handle, and a failure there is silent unless you wrap it, so I wrote a pure-language fallback path.
