Coder Social home page Coder Social logo

kulezi / scylla-rust-driver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scylladb/scylla-rust-driver

0.0 0.0 0.0 1.31 MB

Async CQL driver for Rust, optimized for Scylla!

License: Apache License 2.0

Shell 0.21% Rust 99.57% PowerShell 0.13% Makefile 0.06% Dockerfile 0.02%

scylla-rust-driver's Introduction

ScyllaDB Rust Driver

Crates.io docs.rs minimum rustc version

This is a client-side driver for ScyllaDB written in pure Rust with a fully async API using Tokio. Although optimized for ScyllaDB, the driver is also compatible with Apache Cassandra®.

Note: this driver is officially supported but currently available in beta. Bug reports and pull requests are welcome!

Getting Started

The documentation book is a good place to get started. Another useful resource is the Rust and Scylla lesson on Scylla University.

Examples

let uri = "127.0.0.1:9042";

let session: Session = SessionBuilder::new().known_node(uri).build().await?;

if let Some(rows) = session.query("SELECT a, b, c FROM ks.t", &[]).await?.rows {
    for row in rows.into_typed::<(i32, i32, String)>() {
        let (a, b, c) = row?;
        println!("a, b, c: {}, {}, {}", a, b, c);
    }
}

Please see the full example program for more information. You can also run the example as follows if you have a Scylla server running:

SCYLLA_URI="127.0.0.1:9042" cargo run --example basic

All examples are available in the examples directory

Features and Roadmap

The driver supports the following:

  • Asynchronous API
  • Token-aware routing
  • Shard-aware routing (specific to ScyllaDB)
  • Prepared statements
  • Query paging
  • Compression (LZ4 and Snappy algorithms)
  • CQL binary protocol version 4
  • Batch statements
  • Configurable load balancing policies
  • Driver-side metrics
  • TLS support - install openssl if you want to use it https://docs.rs/openssl/0.10.32/openssl/#automatic
  • Configurable retry policies
  • Authentication support
  • CQL tracing

Ongoing efforts:

  • CQL Events
  • More tests
  • More benchmarks

Getting Help

Please join the #rust-driver channel on ScyllaDB Slack to discuss any issues or questions you might have.

Supported Rust Versions

Our driver's minimum supported Rust version (MSRV) is 1.59.0. Any changes will be explicitly published and will only happen during major releases.

Reference Documentation

Other Drivers

License

This project is licensed under either of

at your option.

scylla-rust-driver's People

Contributors

psarna avatar piodul avatar cvybhu avatar havaker avatar penberg avatar kejmer avatar asledz avatar kbr-scylla avatar ponewor avatar jasperav avatar dgarcia360 avatar dtzxporter avatar quentinperez avatar ultrabug avatar nemosupremo avatar altanozlu avatar macher259 avatar jasperav1994 avatar procrastinationfighter avatar gor027 avatar wyfo avatar wprzytula avatar harisraharjo avatar lseelenbinder avatar merlleu avatar raoufchebri avatar tzach avatar guy9 avatar lauranovich avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.