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:
The following is a very simple example of CRUD operations in an Aerospike database.
extern crate aerospike;
use env;
use Instant;
use ;
use operations;
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
To enable debug logging for the aerospike
crate:
$ RUST_LOG=aerospike=debug cargo test
To enable backtraces set the RUST_BACKTRACE
environment variable:
$ RUST_BACKTRACE=1 cargo test
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.