finds.dev← search

// the find

georust/rstar

★ 547 · Rust · Apache-2.0 · updated Jun 2026

R*-tree spatial index for the Rust ecosystem

rstar is an R*-tree spatial index for Rust: insert points, lines, and rectangles, then query by nearest neighbor or bounding box in any number of dimensions. It's the spatial index backing the `geo` crate, so if you're doing geospatial work in Rust you've probably already been using this indirectly. Directly useful for game collision detection, geographic search, or any problem that needs fast 'what's near X?' answers.

The n-dimensional generalization is well-designed — the `RTreeObject` trait lets you plug in arbitrary types without fighting the API. Bulk loading is implemented (STR packing), which matters if you're building the index from a large static dataset rather than inserting incrementally. The `geo` crate integration means complex geometry types like polygons and linestrings work out of the box without writing your own `RTreeObject`. The benchmark suite in `rstar-benches/` exists and is runnable, so you can actually measure what you're getting.

547 stars for the primary spatial index in the Rust geo ecosystem feels underrepresented, but the real concern is maintenance velocity — the CHANGELOG and commit history would tell you more than the June 2026 push date. No persistent/disk-backed option, so the entire index lives in memory; if your dataset is large and you need to survive restarts, you're serializing and deserializing the whole thing yourself. The README in the root is almost empty — it just points to the crate subdirectory, which is a small friction bump for anyone landing from crates.io. Deletion from the tree is O(log n) but does not rebalance aggressively, so a workload with heavy mixed inserts and deletes will degrade over time without a full rebuild.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →