Skip to content

Consider migrating from unmaintained hnswlib-node to modern alternatives like USearch or Faiss #42

@Perlenjaeger

Description

@Perlenjaeger

First of all, thank you for this fantastic plugin! The persistent memory functionality is incredibly valuable for AI coding workflows.
I'd like to bring to your attention that the current vector search dependency hnswlib-node appears to be unmaintained:

Current Situation

  • hnswlib-node: Last updated ~3 years ago (v3.0.0 - March 2024)
  • hnswlib-wasm: Also last updated ~3 years ago (v0.8.2 - July 2023)

Both packages have open issues and PRs without recent activity, which raises concerns about:

  • Long-term maintenance and security updates
  • Compatibility with newer Node.js/Bun versions
  • Bug fixes and feature improvements

Bun Compatibility Issue

In particular, hnswlib-node currently crashes when loaded with Bun (v1.3.9+) due to its use of uv_version_string - a libuv function not yet implemented in Bun (see oven-sh/bun#18546). This prevents the plugin from working in Bun-based environments like OpenCode.

Proposed Alternatives

Would you consider evaluating these actively maintained alternatives?

  1. USearch (unum-cloud/usearch)
    • Modern, high-performance vector search engine
    • Very active development (last update: 2 months ago)
    • 169 versions published
    • Smaller & faster than HNSW
    • Good Node.js bindings available
  2. Faiss (facebookresearch/faiss)
    • Industry standard from Meta
    • Well-maintained with regular releases
    • Node.js bindings available via faiss-node
  3. Pure SQLite-based approach
    • Versions 2.9.x used sqlite-vec which worked well
    • Could consider sqlite-vec or similar SQLite extensions
    • Simpler deployment, no native addon dependencies

Questions

  • Are there specific technical requirements that led to choosing HNSW over alternatives?
  • Would you be open to a PR that implements an abstraction layer allowing pluggable vector backends?
  • Is there a roadmap for dependency updates?

Happy to help test or contribute if useful. Thanks again for the great work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions