---
title: "Install the Aerospike Rust client"
description: "Install the Aerospike Rust client via 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 latest stable release of the Rust client is [version 2.0.0](https://github.com/aerospike/aerospike-client-rust/blob/master/CHANGELOG.md).
    
-   With version 3.0.0, the Rust client will become an officially supported Aerospike client library.
    

## Prerequisites

| Client version | Minimum Rust version |
| --- | --- |
| 2.0.0 | 1.86 |
| 1.3.0 | 1.34 |

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

For Tokio, use:

Terminal window

```bash
cargo add tokio

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

For async-std, use:

Terminal window

```bash
cargo add async-std

cargo add aerospike@2.0.0 --features rt-async-std
```

## Build from source code

1.  Clone the Git repository:
    
    ```plaintext
    git clone --single-branch --branch v2 https://github.com/aerospike/aerospike-client-rust.git
    
    cd aerospike-client-rust
    ```
    
2.  Build the project:
    
    ```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`:
    
    ```yaml
    [dependencies]
    
    # Async API with tokio Runtime
    
    aerospike = { version = "VERSION", features = ["rt-tokio"]}
    
    # OR
    
    # Async API with async-std runtime
    
    aerospike = { version = "VERSION", features = ["rt-async-std"]}
    
    # The library still supports the old sync interface, but it will be deprecated in the future.
    
    # This is only for compatibility reasons and will be removed in a later stage.
    
    # Sync API with tokio
    
    aerospike = { version = "VERSION", default-features = false, features = ["rt-tokio", "sync"]}
    
    # OR
    
    # Sync API with async-std
    
    aerospike = { version = "VERSION", default-features = false, features = ["rt-async-std", "sync"]}
    ```
    
2.  Build the project:
    
    ```plaintext
    cargo build
    ```
    

## Next steps

Usage examples

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

[Usage examples →](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)