Mojo

USearch for Mojo

usearch_mojo = { git = "https://github.com/unum-cloud/USearch", subdirectory = "mojo", tag = "v3.0.0-rc.1" } 3.0.0-rc.1 · 4c3e5023

It needs Mojo 1.2 through pixi, on Linux x86-64, Linux AArch64 or macOS on Apple silicon. On Linux it needs glibc 2.39 or newer, the first conda-forge sysroot whose kernel headers carry the io_uring flags the NVMe engine sets. It exposes dense indexes, Vector Search over equidimensional embeddings; sequence, matrix and geospatial indexes follow as the C library ships them.

Topics

InstallationLet Pixi build the package from source, with no channel to add and no linker flag to pass; the engine arrives as its run dependency, in the environment prefix mojo build bakes as runpath.
QuickstartAn index owns entries; an Executor owns the threads or streams a call runs on; an Arena owns the outputs a call writes.
Executors54One executor serves any number of indexes, and its residency must match the one their handles were built for.
Keys4A key is 128 bits of opaque identity, rendered as a lowercase dashed UUID.
Inputs and Outputs23Every output whose length only the call knows, such as matches, rows, products, monoliths and cursor or stream batches, lands in an Arena you pass, and the verb answers a view over it without copying.
Metrics19DenseOptions freezes an index's geometry: its dimensions, metric, quantization, connectivity and valuesperkey, angular over BF16 vectors unless told otherwise, with every zeroed optional field derived.
Residency11Where the payload lives is the constructor's name, as in the C lifecycle verbs, so a residency an index lacks has no constructor to call.
Serialization9Checkpoints ride the SafeGraphs interchange format, and the path extension picks the layout.
Filtered Search1A predicate in the DenseSearchConfig admits only the keys it approves, while non-matching entries still route the traversal, so recall does not collapse at low selectivity.
Refinement4refine re-runs the neighbor selection over entries already in the graph, returning a DenseRefineReport: the entries re-selected and changed, the islands found and reconnected, and the closing audit.
Linear Algebra13multiply is a sparse matrix product: every pair the walk scored for each left row, in traversal order, lands in an arena as one ragged run, with one more offset than left rows, as Apache Arrow lays a ragged batch out.
Retrieval and Streaming27get exports every entry stored under one key, one row per entry in insertion order, as DenseVectors, whose every row is exactly columns() values wide, as the engine reported them, however far apart the engine laid the rows.
Introspection26health audits how much of the graph a search reaches from its landmarks; entries it misses stay unfound until a refine re-links them.
Errors5Every fallible entry point raises Error and nothing else, since Mojo allows one error type per function.
Platform Notes