Aerospike Rust Client

An Aerospike client library for Rust.
This library is compatible with Rust 1.46+ and supports the following operating systems: Linux, Mac OS X, and Windows. The current release supports Aerospike version v5.6 and later. Take a look at the changelog for more details.
Usage:
Add one of the following to your cargo file
# Async API with tokio Runtime
= { = "<version>", = ["rt-tokio"]}
# Async API with async-std runtime
= { = "<version>", = ["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
= { = "<version>", = false, = ["rt-tokio", "sync"]}
# Sync API with async-std
= { = "<version>", = false, = ["rt-async-std", "sync"]}
The following is a very simple example of CRUD operations in an Aerospike database.
extern crate aerospike;
extern crate tokio;
use env;
use Instant;
use ;
use operations;
async
Known Limitations
The following features are not yet supported in the Aerospike Rust client:
- Query Aggregation using Lua User-Defined Functions (UDF).
- Secure connections using TLS.
- IPv6 support.
Tests
This library is packaged with a number of tests. The tests assume that an
Aerospike cluster is running at localhost:3000. To test using a cluster at a
different address, set the AEROSPIKE_HOSTS environment variable to the list
of cluster hosts.
To run all the test cases:
$ export AEROSPIKE_HOSTS=127.0.0.1:3000
$ cargo test --features <runtime>
To enable debug logging for the aerospike crate:
$ RUST_LOG=aerospike=debug cargo test --features <runtime>
To enable backtraces set the RUST_BACKTRACE environment variable:
$ RUST_BACKTRACE=1 cargo test --features <runtime>
Benchmarks
The micro-benchmarks in the benches directory use the
bencher crate and can be run on Rust
stable releases:
$ export AEROSPIKE_HOSTS=127.0.0.1:3000
$ cargo bench
There is a separate benchmark tool under the tools/benchmark directory that is designed to insert data into an Aerospike server cluster and generate load.