Rust SDK Reference
The milvus-sdk-rust is the official Rust SDK for Milvus and Zilliz Cloud. It provides an async V2 client for vector similarity search, metadata filtering, and full collection, index, and user management.
Features
- Async-first client — Create a
ClientV2with a builder-styleConnectConfig; operations return Rust futures. - Vector operations — Similarity search, hybrid search with function chains, rerankers, and filter templates
- Data management — Insert, upsert, delete, and query with scalar filters and iterators
- Schema flexibility — Dynamic fields, struct fields, and functions for multi-tenancy
- Bulk operations — Server-side bulk import with object storage, volumes, and import job management
- Enterprise features — RBAC, privilege groups, snapshots, databases, and file resources
Installation
bash
cargo add milvus-sdk-rust
Requirements: Rust 1.86+
Quick Start
Copy the public endpoint from the cluster Connect card and use an API key or cluster credential as the token.
rust
use milvus::v2::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
let client = ClientV2::new(
&ConnectConfig::new()
.uri("YOUR_CLUSTER_ENDPOINT")
.token("YOUR_CLUSTER_TOKEN"),
)
.await?;
let collections = client
.list_collections(ListCollectionsRequest::builder().build()?)
.await?;
println!("{:?}", collections);
Ok(())
}
Overview
The milvus-sdk-rust is the official Rust SDK for Milvus and Zilliz Cloud. It provides an async V2 client for vector similarity search, metadata filtering, and full collection, index, and user management.
Client
5 items
Collections
39 items
Data Import
6 items
Management
25 items
Snapshots
11 items
Vector
22 items
Authentication
20 items
Database
7 items
Partitions
7 items
FileResources
3 items