The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 1.9.0,
an asynchronous CQL driver for Rust, optimized for ScyllaDB, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 8.7M downloads on crates.io!
- over 688 GitHub stars!
Changes
Deprecations and necessary code adjustments
Deprecation of TlsContext::OpenSsl010
TlsContext::OpenSsl010 was deprecated, and replaced with TlsContext::OpenSsl010Config. The new variant allows the driver to use TLS tickets in order to lessen the server load when establishing new connections.
TlsContext::OpenSsl010 stored a bare openssl::ssl::SslContext. This is not enough for the driver to support tickets, so the new variant can only be constructed from a builder, not a ready context. Two ways to do that:
- Recommended: from
SslConnectorBuilder. You can just passOption<SslConnectorBuilder>toSessionBuilder::tls_context, because there isimpl From<SslConnectorBuilder> for TlsContext. If you wish to disable TLS tickets (or do other configuration that might get introduced in the future), then first convert yourSslConnectorBuilderto ourOpenSsl010Config, either withOpenSsl010Config::neworimpl From<SslConnectorBuilder> for OpenSsl010Config. - From
SslContextBuilder. This is easier to migrate to, but not recommended:SslContextBuilderdefaults are less safe thanSslConnectorBuilder. UseOpenSsl010Config::from_dangerous_builderto do that.
scylla-cql 2.0
The driver consists of 4 main crates, which until now were always released in sync with the same version number: scylla (main crate), scylla-cql (protocol implementation), scylla-cql-core (recently extracted from scylla-cql, consisting of the parts of the protocol implementation that are public in scylla), scylla-macros (derive macros for our ser / deser traits).
The scylla-cql-core extraction made scylla-cql a fully internal crate: we can bump its major version number without having to do the same for scylla. This is what we do in this release, because of a breaking change we had to make in scylla-cql.
If you only have the scylla crate in your Cargo.toml (as you typically should), you do not need to do anything.
If for some reason you have scylla-cql in your Cargo.toml, your code will keep compiling and working. You will be using a different version (1.x) of scylla-cql than the driver uses (2.x). Everything works, because all the common parts are extracted to scylla-cql-core.
In general you should have no need to depend on scylla-cql directly, so try to remove this dependency. If you can’t, update to 2.0 to keep in sync with the driver and avoid code bloat.
New features / enhancements
- Implemented a new statement type:
BoundStatement. It allows you to pre-serialize request parameters, move them around together with the statement in its owned form, and calculate a token based on that (#1862, #1866, #1883). - The driver will now report many parts of its configuration in the
STARTUPmessage of a control connection. This data can be seen in thesystem.clientstable and is intended for debugging / diagnostic purposes. You can disable it withSessionBuilder::driver_config_reporting(false)(#1905). - Implemented TLS tickets support for the OpenSSL backend. Rustls supports them automatically, so no changes were necessary on our side (#1794, #1874, #1875).
- Each driver connection now sends a
SESSION_IDin theSTARTUPframe. This is visible in thesystem.clientstable and can be used to associate different connections of a single driver session (#1882). - Previously, the driver refreshed all metadata (schema, topology) periodically (by default, every 60s). This could be costly, especially if you have many clients. Now the driver correctly reacts to CQL events, and only fetches what is necessary. It aggregates schema change events, and periodically fetches only the parts of the schema that were indicated as changed by events (#1849, #1850, #1853).
- Implemented TABLETS_ROUTING_V2 extension support, currently experimental in Scylla, and leader-aware routing for Scylla’s upcoming Strong Consistency mode (#1788, #1887, #1890).
- If a connection pool opens a connection to a different node than it expected, most likely due to network misconfiguration, an
error!will now be logged (on recent Scylla versions only) (#1872).
Bug fixes
- Connection metrics are now correctly balanced when clearing pools or rejecting an unnecessary connection (#1801).
- Keyspace change failures on connection startup are no longer ignored; they now correctly defunct the connection (#1801).
- The driver now uses one
ClusterStatefor the whole request (previously some tracing logs could use a different one) (#1885). Pagernow only computes replicas for tracing purposes when the trace they are used in is actually enabled (#1904).scylla-proxyused in tests now selects its address from the address family of the real node address (#1902).VectorSerializationErrorKindis now re-exported in thescyllacrate (#1899).
Internal refactors
- Fixed new warnings produced by Clippy 1.98 (#1854).
Documentation
- Changed all doc comments and the documentation book to remove trailing backslashes (#1878).
- Our docs / examples / tests no longer rely on autogenerated names of unnamed bind markers (#1870).
- Expanded our custom serialization / deserialization examples (#1831).
CI / tests / developer tool improvements
- Added code coverage measurement for unit and integration tests (#1844).
- Introduced
cargo-denyto our CI (#1848). - Added integration tests for compression (#1896).
- Changed more integration tests to use tablets (#1861).
- Added an integration test for
SELECTwithoutFROM(new Scylla feature) (#1879). - Added tests for the orphaning mechanism (#1863, #1873).
Dependencies
- Updates to our JIRA automation (#1839, #1843, #1864, #1891, #1916).
- Updates to the Scylla version used in tests, up to 2026.3.0 (#1840, #1855, #1894).
- Updated taiki-e/install-action, up to v2.81.7 (#1841, #1842, #1895).
- Updated actions/checkout to v6.0.3 (#1892, #1917).
- Updated astral-sh/setup-uv to v8.2.0 (#1893).
- Updated the jsonschema Rust crate to 0.56 (#1918).
Congrats to all contributors and thanks to everyone for using our driver!
The source code of the driver can be found here:
- https://github.com/scylladb/scylla-rust-driver
Contributions are most welcome!
The official crates.io registry entry is here:
Thank you for your attention, please do not hesitate to contact us if you have any questions, issues, feature requests, or are simply interested in our driver!
Contributors since the last release:
| commits | author |
|---|---|
| 66 | Karol Baryła |
| 29 | Wojciech Przytuła |
| 17 | Dawid Mędrek |
| 15 | renovate[bot] |
| 5 | Piotr Dulikowski |
| 4 | Guflly |
| 3 | w3lld1 |
| 1 | ColumbusLabs |
| 1 | Israel Fruchter |
| 1 | Roy Dahan |
| 1 | 송은우 |