crig-sqlite

Crystal vector store powered by SQLite and sqlite-vec for similarity search.
Development dependencies (0)

Postinstall script
# Auto-download sqlite-vec extension if not present lib_dir = File.join(Dir.current, "lib") platform = {% if flag?(:darwin) %} {% if flag?(:aarch64) || flag?(:arm64) %} "macos-aarch64" {% else %} "macos-x86_64" {% end %} {% elsif flag?(:linux) %} {% if flag?(:aarch64) || flag?(:arm64) %} "linux-aarch64" {% else %} "linux-x86_64" {% end %} {% elsif flag?(:windows) %} "windows-x86_64" {% else %} nil {% end %} if platform ext_name = {% if flag?(:darwin) %} "vec0.dylib" {% elsif flag?(:linux) %} "vec0.so" {% elsif flag?(:windows) %} "vec0.dll" {% else %} nil {% end %} if ext_name && !File.exists?(File.join(lib_dir, ext_name)) puts "Downloading sqlite-vec extension for #{platform}..." version = "0.1.9" url = "https://github.com/asg017/sqlite-vec/releases/download/v#{version}/sqlite-vec-#{version}-loadable-#{platform}.tar.gz" Dir.mkdir_p(lib_dir) temp = File.tempname("sqlite-vec") begin HTTP::Client.get(url) do |r| File.write(temp, r.body_io) end Process.run("tar", ["-xzf", temp, "-C", lib_dir]) puts "✅ sqlite-vec extension downloaded" rescue puts "⚠️ Could not download sqlite-vec automatically" puts " Run: ./scripts/install_sqlite_vec.sh" ensure File.delete(temp) if temp && File.exists?(temp) end end end
Repository

crig-sqlite

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 1
  • about 6 hours ago
  • April 1, 2026
License

MIT License

Links
Synced at

Wed, 01 Apr 2026 22:19:22 GMT

Languages