muvera-rs
Rust-native MUVERA: multi-vector retrieval via fixed dimensional encodings, plus Python bindings for wheel builds.
PyPI project name: muvera-rs (import as muvera).
This repository is based on the paper.
Status
The active implementation is now Rust-first:
- core library: crates/muvera-core
- Python extension: crates/muvera-py
- Python package shim: python/muvera
The legacy C++ remains in the repository on branch legacy_cpp for reference.
This repository is under active development.
Contributing
Build the Rust library
Create and activate the Conda environment first:
conda env create -f environment.yml
conda activate muvera-rust
If the environment already exists and you only want to refresh dependencies:
conda env update -f environment.yml --prune
conda activate muvera-rust
Then from the repository root:
cargo test
Build the Python wheel locally
maturin build --release
To install into the current environment:
maturin develop --release
Then in Python:
from muvera import MuveraRetriever
retriever = MuveraRetriever(
dimensions=3,
max_points=500,
d_proj=128,
d_final=10240,
k_sim=10,
r_reps=5,
seed=42,
)
dataset = [
[[1.0, 2.0, 3.0], [1.0, -2.0, 3.0]],
[[4.0, 5.0, 6.0], [4.0, -5.0, 6.0]],
]
retriever.index_dataset(dataset, [1, 2])
print(retriever.get_top_k(dataset[0], 1))
Python build, test, and release
Local compile/test/package checks
After activating muvera-rust, from the repository root:
cargo test -p muvera-core
maturin develop --release
python -m pytest -q python/tests
rm -rf dist
maturin build --release --sdist -o dist
python -m twine check dist/*
GitHub Actions workflows
- CI workflow:
.github/workflows/python-ci.yml- Runs Rust tests, Python smoke tests, and package metadata checks on push/PR.
- Builds a wheel with
maturin buildand installs it withpipfor testing; it does not usematurin develop.
- Release workflow:
.github/workflows/python-release.yml- Manual only via GitHub Actions
workflow_dispatch. - Builds wheels (Linux/macOS/Windows) and sdist.
- Publishes to TestPyPI via manual dispatch (
repository=testpypi). - Publishes to PyPI via manual dispatch (
repository=pypi).
- Manual only via GitHub Actions
For publishing, configure trusted publishing in PyPI/TestPyPI for this repository so
pypa/gh-action-pypi-publish can use OIDC (id-token: write).
Typical release flow:
conda activate muvera-rust
cargo test -p muvera-core
maturin develop --release
python -m pytest -q python/tests
rm -rf dist
maturin build --release --sdist -o dist
python -m twine check dist/*
git tag v0.1.1
git push origin v0.1.1
Then trigger .github/workflows/python-release.yml manually in GitHub Actions and choose
repository=testpypi or repository=pypi.
Notes
- The Rust port includes the full FDE pipeline and both retrievers.
- The active
MuveraRetrieveris Rust-native and no longer compiles the legacy C++ DiskANN sources. - The Python package is configured through pyproject.toml for PyPI-compatible wheel builds.
- The legacy C++ code is available on the
legacy_cppbranch.
Acknowledgements
We sincerely appreciate Rajesh and other original authors for explaining to us the original experimental recipes and open sourcing the source code snippet with Google.
The index backend uses Microsoft DiskANN. We sincerely appreciate the open source efforts from folks at Microsoft.
Metadata
Release files for muvera-rs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| muvera_rs-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| muvera_rs-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| muvera_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 1.9 MB
Release files / muvera_rs-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | muvera_rs-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 659.8 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7e1c0be404dc931b953740adfff6d1696f772decf3128f08433129a7a4ef0a97
|
|
BLAKE2b-256 checksum How to use checksums |
328b279f094540ce782c0fe1650dfd18accbca7eb78a45c10b40b517b0cc8d88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / muvera_rs-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl
| Download URL | muvera_rs-0.1.0-cp39-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 638.9 kB |
| Tags | CPython 3.9 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
248f7492220aceb0d586b7f22b319c92ca268f8517246754f257137c834cf9b4
|
|
BLAKE2b-256 checksum How to use checksums |
c8c65af1c08699989f537bb1027f7a7f34c22a9c65dcc9282c56b4ab90ec2449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency logRelease files / muvera_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | muvera_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 556.8 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb27a66e146ba0563771127d465da8f82e8c153434bf7873f273e30d851846b0
|
|
BLAKE2b-256 checksum How to use checksums |
37e779d2e1f5d82294c0fe4db46f39a74b59805d0596b9b40fb9b26962d1651a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 26, 2026.
Transparency log