No description, website, or topics provided.
Clone or download

Build Status Current Version License: MPL-2.0


This is a maintained rust project that exposes the cpp driver at in a somewhat-sane crate.

For the wrapper to work, you must first have installed the datastax-cpp driver.

Follow the steps on the cpp driver docs to do so.

Make sure that the driver (specifically libcassandra_static.a and are in your /usr/local/lib64/ directory

You can use it from cargo with

    git = ""

Or just


Here's a straightforward example found in

    extern crate cassandra;
    use cassandra::*;
    use std::str::FromStr;
    fn main() {
        let query = stmt!("SELECT keyspace_name FROM system_schema.keyspaces;");
        let col_name = "keyspace_name";
        let contact_points = ContactPoints::from_str("").unwrap();
        let mut cluster = Cluster::default();
        match cluster.connect() {
            Ok(ref mut session) => {
                let result = session.execute(&query).wait().unwrap();
                println!("{}", result);
                for row in result.iter() {
                    let col: String = row.get_col_by_name(col_name).unwrap();
                    println!("ks name = {}", col);
            err => println!("{:?}", err),

There's additional examples included with the project in src/examples.