funcvec 0.1.3

Find likely duplicate Rust functions with language-server extraction and local embeddings.
Documentation

funcvec

funcvec finds likely duplicate Rust functions. It discovers functions through rust-analyzer/LSP symbols, builds function vectors, and reports candidates that look similar enough to review and potentially merge.

Install

cargo install funcvec

For local development from this repository:

cargo install --path crates/funcvec-cli

The install includes both funcvec and cargo-funcvec, so it can be run directly or as a Cargo subcommand.

Usage

From inside a Rust project:

funcvec
cargo funcvec

Useful variants:

funcvec --provider none --top-k 10
funcvec path/to/project --provider lexical --threshold 0.72
funcvec report path/to/project --provider nomic
funcvec eval path/to/project --provider nomic --models nomic-v1,nomic-v1.5

The default provider is lexical so the standard install remains lightweight. Native Nomic embeddings are available with:

cargo install funcvec --features native-nomic

When built with that feature, Nomic downloads model files once into a local cache and then runs without Ollama or another daemon.

Set FUNCVEC_MODEL_CACHE_DIR to control the native model cache location.