Skip to content

feat: statically link sqlite-vec and improve fresh install reliability#11

Merged
blackaxgit merged 6 commits intomainfrom
fix/installation-improvements
Mar 20, 2026
Merged

feat: statically link sqlite-vec and improve fresh install reliability#11
blackaxgit merged 6 commits intomainfrom
fix/installation-improvements

Conversation

@blackaxgit
Copy link
Copy Markdown
Owner

@blackaxgit blackaxgit commented Mar 20, 2026

Summary

Eliminates the #1 installation pain point (manual sqlite-vec download) and improves fresh install reliability with 7 fixes from two user installation reports.

Changes

F-08: Static link sqlite-vec (CRITICAL)

  • Add sqlite-vec v0.1.7 Rust crate with compile-time static linking
  • Register via sqlite3_auto_extension() -- every SQLite connection automatically has vec0
  • Remove all runtime load_extension() code, path searching, dylib detection
  • Users no longer need to download vec0.dylib -- vector search works out of the box

F-07: Sync model names from config

  • install.sh and clx-services.sh read model names from ~/.clx/config.yaml at runtime
  • Fallback defaults: qwen3:1.7b and qwen3-embedding:0.6b
  • Prevents drift between installer and user config

F-02: Force-pull Docker image

  • docker pull ollama/ollama:latest before starting container (avoids stale cache)

F-03: Create Docker directory in Rust installer

  • clx install now creates ~/.clx/docker/ and writes docker-compose.yml

F-04: clx-hook --help and TTY detection

  • Running clx-hook manually shows usage message instead of JSON parse error

F-05: Prerequisite validation

  • install.sh checks for cargo, git, curl before building
  • Offers automatic Rust installation via rustup

F-06: Corporate TLS/SSL support

  • Commented CA cert volume mount in docker-compose.yml

Test plan

  • 787 tests pass
  • 0 clippy warnings
  • Shell scripts pass bash -n syntax check
  • Vector search always enabled (static linking verified)
  • Stale dylib download block removed from install.sh

blackaxgit and others added 6 commits March 20, 2026 09:59
Replace runtime load_extension() mechanism for sqlite-vec with
compile-time static linking using the sqlite-vec Rust crate (v0.1.7).
This eliminates the #1 installation pain point where users had to
manually download vec0.dylib and deal with macOS Gatekeeper issues.

Key changes:
- Add sqlite-vec 0.1.7 as workspace dependency
- Remove "load_extension" feature from rusqlite
- Add init_sqlite_vec() using sqlite3_auto_extension in clx-core
- Call init_sqlite_vec() from all 3 binary entry points
- Remove try_load_vec_extension(), get_extension_search_paths()
- Remove extension_loaded field from EmbeddingStore
- Simplify is_vector_search_enabled() to always return true
- Remove all "download vec0.dylib" user-facing messages
- Update tests to call init_sqlite_vec() in test harnesses

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-02: Force-pull Docker image before starting (avoid stale cache)
F-03: Create ~/.clx/docker/ and embed docker-compose.yml in Rust installer
F-04: Add --help and TTY detection to clx-hook (no more parse errors)
F-05: Add prerequisite validation to install.sh (cargo, git, curl)
F-06: Add commented CA cert mount to docker-compose.yml for corporate TLS
install.sh and clx-services.sh now read model names from
~/.clx/config.yaml if available, with qwen3:1.7b and
qwen3-embedding:0.6b as fallback defaults. Prevents drift
between installer and user config.
@blackaxgit blackaxgit merged commit 3d4e84e into main Mar 20, 2026
7 checks passed
@blackaxgit blackaxgit deleted the fix/installation-improvements branch March 20, 2026 23:03
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