manifold-knn is a Rust library that helps you find the closest points to any location in a large point cloud very quickly. It works by building a special spatial map that tracks how points are connected, then uses a clever search technique to explore only the most promising areas. The library supports adding and removing points dynamically, can work with 3D Delaunay triangulations, and offers optional speed boosts through parallel processing and SIMD instructions. It's based on a 2026 academic paper and provides mathematically exact results.
How It Works
Your data exists as coordinates in space - like a 3D scan of an object, sensor readings, or spatial measurements.
Checking every single point to find the closest ones takes too long when you have thousands or millions of points.
The library builds a special map that tracks how points are connected, so it can skip vast regions of space during searches.
You already know which points were neighbors when your data was created.
The library creates a Delaunay triangulation to discover how your points are spatially connected.
Ask 'which 5 points are nearest to this location?' and the index follows the most promising connections.
The nearest neighbors appear in milliseconds, even with large datasets, and the results are mathematically exact.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.