milvus-sdk-rust

Crates.iomilvus-sdk-rust
lib.rsmilvus-sdk-rust
version0.1.0
sourcesrc
created_at2023-05-23 03:55:11.933439
updated_at2023-05-23 03:55:11.933439
descriptionThe official Milvus Rust SDK
homepage
repository
max_upload_size
id871670
size883,089
(yah01)

documentation

README

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(())
}
Commit count: 0

cargo fmt