How unum-cloud/usearch works
Project type and purpose
• USearch is an open-source, single-file C++11 similarity-search and clustering engine (HNSW) with native bindings in 10+ languages. It’s not a monolithic app but a library/toolkit that exposes a common core to multiple host languages.
File structure
• Top-level build & config: CMakeLists.txt, build.rs, build.gradle, binding.gyp, Cargo.toml, pyproject.toml, Dockerfile, GitHub workflows.
• Core C++ engine: include/usearch/index.hpp + lib.cpp under each language folder.
• Language bindings:
• c/ (C99 API)
• cpp/ (C++ examples/tests)
• python/ (CPython extension, setup.py, pyproject.toml, client/server modules)
• javascript/ (node-gyp + TypeScript definitions)
• java/ (JNI wrapper cloud_unum_usearch_Index.cpp + Maven/CMake config)
• csharp/ (P/Invoke via NativeMethods, .NET solution)
• golang/ (cgo wrapper)
• rust/ (build.rs + lib.rs)
• swift/, objc/, wasm/, sqlite/, wolfram/…
• Documentation: docs/ (Sphinx), assets/, language-specific .rst files
• Tests & benchmarks: *test.* files in each language folder + BENCHMARKS.md
• CI/CD & publishing: .github/workflows (release, prerelease), .releaserc, npmignore, MANIFEST.in
README for additional insights
• Central “single C++ header” library.
• Unified API (“Index” object, add/search/serialize) across all bindings.
• Advanced features: user-defined metrics via JIT, multi-index lookups, clustering, joins, quantization.
• Integration points: NumPy, Numba, JNI, P/Invoke, cgo, node-gyp, Rust FFI, etc.
• Distribution targets: PyPI, npm, crates.io, NuGet, Maven, homebrew, Docker image.