CDRS
CDRS is Apache Cassandra driver written in pure Rust.
Features
- TCP/SSL connection;
- Load balancing;
- Connection pooling;
- LZ4, Snappy compression;
- Cassandra-to-Rust data deserialization;
- Pluggable authentication strategies;
- ScyllaDB support;
- Server events listening;
- Multiple CQL version support (3, 4), full spec implementation;
- Query tracing information.
Documentation and examples
- User guide.
- Examples.
- API docs (release).
Getting started
Add CDRS to your Cargo.toml
file as a dependency:
= { = "2" }
Then add it as an external crate to your main.rs
:
extern crate cdrs;
use NoneAuthenticator;
use ;
use ;
use RoundRobin;
use *;
This example configures a cluster consisting of a single node, and uses round robin load balancing and default r2d2
values for connection pool.
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.