---
title: "Install the Aerospike Rust client"
description: "Install the Aerospike Rust client using Cargo or building from source, with support for Tokio and async-std runtimes."
---

# Install the Aerospike Rust client

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

## Versions

-   The current stable release of the Rust client is [version 3.0.0](https://github.com/aerospike/aerospike-client-rust/).
    
    The Rust client is now an officially supported Aerospike client library.
    

## Prerequisites

| Client version | Minimum Rust version |
| --- | --- |
| 3.0.0 | 1.87 |
| 2.2.0 | 1.87 |
| 2.1.0 | 1.87 |
| 1.3.0 | 1.46 |

-   An Aerospike server. See the [Client matrix](https://aerospike.com/docs/develop/client-matrix) for client and server version compatibility.
-   Rust at or above the minimum for your client version (table).
-   Tokio or async-std, matching the `rt-*` feature you enable in `Cargo.toml`.

## Install

To use the client in your own project, select whether to use Tokio or async-std for your async runtime.

For Tokio, use:

Terminal window

```bash
cargo add tokio

cargo add aerospike@3.0.0 --features rt-tokio
```

For async-std, use:

Terminal window

```bash
cargo add async-std

cargo add aerospike@3.0.0 --no-default-features --features async,rt-async-std,serialization
```

## Build from source code

1.  Clone the Git repository:
    
    ```plaintext
    git clone --single-branch --branch v3.0.0 https://github.com/aerospike/aerospike-client-rust.git
    
    cd aerospike-client-rust
    ```
    
2.  Build the project (requires Rust 1.87 or later):
    
    ```plaintext
    cargo build
    ```
    

## Use as a dependency

1.  To use the client in your own project, add one of the following to your `Cargo.toml`:
    
    ```toml
    [dependencies]
    
    # Async API with Tokio runtime (default features include async, tls, and serialization)
    
    aerospike = { version = "3.0.0", features = ["rt-tokio"] }
    
    # OR
    
    # Async API with async-std runtime (disable defaults — they already include rt-tokio)
    
    aerospike = { version = "3.0.0", default-features = false, features = ["async", "rt-async-std", "serialization"] }
    
    # Blocking sync API (enable `sync` and disable default `async` — do not enable both)
    
    aerospike = { version = "3.0.0", default-features = false, features = ["rt-tokio", "sync"] }
    
    # OR
    
    aerospike = { version = "3.0.0", default-features = false, features = ["rt-async-std", "sync"] }
    ```
    
    Add a runtime crate to your project as well (`tokio` or `async-std`), matching the `rt-*` feature you chose.
    
2.  Build the project:
    
    ```plaintext
    cargo build
    ```
    

## Verify

Confirm the crate resolves and the project builds:

Terminal window

```bash
cargo build
```

Expected: the build completes without errors.

## Next steps

Usage examples

Ready for more code examples? We have usage examples for all the basic CRUD operations.

[Create records →](https://aerospike.com/docs/develop/client/rust/usage/atomic/create)

Error handling

Actionable errors with recovery suggestions. Know exactly what went wrong and how to fix it.

[Error handling →](https://aerospike.com/docs/develop/client/rust/error-handling)