Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

VSAG can be installed as a C++ library, a Python package (pyvsag), or a Node.js/TypeScript package (vsag).

The official development image includes the full toolchain (GCC 9.4+, CMake 3.18+, clang-format/clang-tidy 15, HDF5, etc.):

docker pull vsaglib/vsag:ubuntu
docker run -it --rm -v $(pwd):/work -w /work vsaglib/vsag:ubuntu bash

Building from Source

Requirements

  • Operating System: Ubuntu 20.04+, CentOS 7+, or macOS 14+ on Apple Silicon
  • Compiler: GCC 9.4.0+, Clang 13.0.0+, or Apple Clang from Xcode Command Line Tools
  • CMake: 3.18.0+
  • clang-format / clang-tidy: exactly version 15 (enforced by make fmt / make lint)

Build

git clone https://github.com/antgroup/vsag.git
cd vsag
./scripts/deps/install_deps.sh
make release

The dependency script detects Linux versus macOS. On macOS it installs or locates the Homebrew dependencies and uses Apple’s Accelerate framework where appropriate. The supported macOS path is the arm64 C++ library build; published C++ archives and pyvsag wheels remain Linux-focused.

Other common Makefile targets:

  • make debug — plain debug build (no sanitizers; tests/tools/examples disabled by default).
  • make dev — developer configuration: debug + tests + tools + examples.
  • make test — build with tests enabled and run the unit + functional suites.
  • make cov — build with coverage instrumentation; run tests afterwards to generate the report.
  • make asan / make tsan — sanitizer-enabled builds.
  • make pyvsag PY_VERSION=3.10 — build the Python wheel.
  • make dist-pre-cxx11-abi / dist-cxx11-abi / dist-libcxx — build redistributable tarballs.

See Building for details.

Python (pyvsag)

pip install pyvsag

Node.js / TypeScript

npm install vsag

The bindings source lives under typescript/ and the npm package name is vsag.

Optional Features

Enable or disable at CMake configure time with these cache options:

  • ENABLE_INTEL_MKL=ON — Intel MKL acceleration.
  • ENABLE_LIBAIO=ON — Linux AIO for the async_io data-cell backend.
  • ENABLE_LIBURING=ON — Linux io_uring backend; requires liburing.
  • ENABLE_TOOLS=ON — build tools under tools/ (including eval_performance).
  • ENABLE_EXAMPLES=ON — build sample programs under examples/cpp/.

If you build through the project Makefile, the corresponding environment variables are VSAG_ENABLE_INTEL_MKL=ON, VSAG_ENABLE_LIBAIO=ON, VSAG_ENABLE_TOOLS=ON, and VSAG_ENABLE_EXAMPLES=ON. ENABLE_LIBURING is currently a direct CMake option; configure it with cmake -S . -B build-release -DENABLE_LIBURING=ON.