#sdk #progress #milvus

milvus-sdk-rust

The official Milvus Rust SDK

1 unstable release

0.1.0 May 23, 2023

#1302 in Data structures

Download history 128/week @ 2024-01-06 147/week @ 2024-01-13 103/week @ 2024-01-20 83/week @ 2024-01-27 111/week @ 2024-02-03 237/week @ 2024-02-10 132/week @ 2024-02-17 76/week @ 2024-02-24 68/week @ 2024-03-02 124/week @ 2024-03-09 82/week @ 2024-03-16 54/week @ 2024-03-23 114/week @ 2024-03-30 86/week @ 2024-04-06 59/week @ 2024-04-13 30/week @ 2024-04-20

294 downloads per month
Used in llm-chain-milvus

Custom license

760KB
17K SLoC

Go 11K SLoC // 0.0% comments Rust 6K SLoC // 0.0% comments Shell 56 SLoC // 0.2% comments

Milvus Rust SDK

Rust SDK for Milvus.

This is still in progress, be careful to use it in your production

Get Started

Connect to milvus service and create collection:

#[tokio::main]
async fn main() -> Result<(), Error> {
    const URL: &str = "http://localhost:19530";

    let client = Client::new(URL).await?;

    let schema =
        CollectionSchemaBuilder::new("hello_milvus", "a guide example for milvus rust SDK")
            .add_field(FieldSchema::new_primary_int64(
                "id",
                "primary key field",
                true,
            ))
            .add_field(FieldSchema::new_float_vector(
                DEFAULT_VEC_FIELD,
                "feature field",
                256,
            ))
            .build()?;
    let collection = client.create_collection(schema.clone(), None).await?;
    Ok(())
}

Dependencies

~13–25MB
~445K SLoC