Redis-rs

Latest version: v0.14.0

Safety actively analyzes 701910 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

127.0.0.1

let mut con = client.get_connection()?;
redis::cmd("SET").arg("my_key").arg(42).execute(&mut con);


Due to this, `transaction` has changed. The callback now also receives a mutable reference to the used connection.

Old code:

rust
let client = redis::Client::open("redis://127.0.0.1/").unwrap();
let con = client.get_connection().unwrap();
let key = "the_key";
let (new_val,) : (isize,) = redis::transaction(&con, &[key], |pipe| {
let old_val : isize = con.get(key)?;
pipe
.set(key, old_val + 1).ignore()
.get(key).query(&con)
})?;


New code:

rust
let client = redis::Client::open("redis://127.0.0.1/").unwrap();
let mut con = client.get_connection().unwrap();
let key = "the_key";
let (new_val,) : (isize,) = redis::transaction(&mut con, &[key], |con, pipe| {
let old_val : isize = con.get(key)?;
pipe
.set(key, old_val + 1).ignore()
.get(key).query(&con)
})?;


Remove `rustc-serialize` feature ([200](https://github.com/mitsuhiko/redis-rs/pull/200))

We removed serialization to/from JSON. The underlying library is deprecated for a long time.

Old code in `Cargo.toml`:


[dependencies.redis]

0.28.0

Changes & Bug fixes

* ConnectionManager: reconnect on disconnect pushes ([1407](https://github.com/redis-rs/redis-rs/pull/1407))
* ConnectionManager: Support automatic resubscription ([1408](https://github.com/redis-rs/redis-rs/pull/1408))
* Remove async_trait dependency ([1451](https://github.com/redis-rs/redis-rs/pull/1451))
* Expose RetryMethod to consumers ([1454](https://github.com/redis-rs/redis-rs/pull/1454) Braedon-Wooding-Displayr)
* Add ping support to commands & pubsubs ([1341](https://github.com/redis-rs/redis-rs/pull/1341))
* Expose server creation logic through redis-test ([1363](https://github.com/redis-rs/redis-rs/pull/1363))
* Depend only on the required sub-crates of futures ([1465](https://github.com/redis-rs/redis-rs/pull/1465) jplatte)
* **Breaking change**: Mark more `Connection` functions as deprecated ([1468](https://github.com/redis-rs/redis-rs/pull/1468))
* Move repeated logic to function ([1469](https://github.com/redis-rs/redis-rs/pull/1469))

Documentation improvements

* Update README to use rustls ([1397](https://github.com/redis-rs/redis-rs/pull/1397) khacminh)
* Update README.md regarding cargo-nextest ([1445](https://github.com/redis-rs/redis-rs/pull/1445) altanozlu)
* Improve features and TLS docs ([1464](https://github.com/redis-rs/redis-rs/pull/1464))
* Mention Valkey in Readme ([1467](https://github.com/redis-rs/redis-rs/pull/1467))
* Fix automatic resubscription docs ([1450](https://github.com/redis-rs/redis-rs/pull/1450))
* Replace `get_multiplexed_tokio_connection` in examples & tests ([1443](https://github.com/redis-rs/redis-rs/pull/1443))

CI improvements

* Run tests concurrently ([1444](https://github.com/redis-rs/redis-rs/pull/1444))
* Report slow tests more eagerly ([1441](https://github.com/redis-rs/redis-rs/pull/1441))
* Improve testing of optional features ([1448](https://github.com/redis-rs/redis-rs/pull/1448))

New Contributors
* khacminh made their first contribution in https://github.com/redis-rs/redis-rs/pull/1397
* Braedon-Wooding-Displayr made their first contribution in https://github.com/redis-rs/redis-rs/pull/1454
* jplatte made their first contribution in https://github.com/redis-rs/redis-rs/pull/1465

redis-0.27.6
Changes & Bug fixes

* Use runtime agnostic retry mechanism. ([1392](https://github.com/redis-rs/redis-rs/pull/1392))
* Choose sleep function according to active runtime. ([1369](https://github.com/redis-rs/redis-rs/pull/1369))
* MpxConnection: Allow pipelines to continue after error. ([1293](https://github.com/redis-rs/redis-rs/pull/1293))
* Async cluster - Do not retry requests that have been dropped by the user. ([1318](https://github.com/redis-rs/redis-rs/pull/1318))
* Sync cluster - reconnect after complete disconnect. ([1233](https://github.com/redis-rs/redis-rs/pull/1233))
* feat: Add high level type for ROLE command ([1321](https://github.com/redis-rs/redis-rs/pull/1321) DCjanus)
* impl CLIENT ID ([1382](https://github.com/redis-rs/redis-rs/pull/1382) ArtemIsmagilov)
* impl CLIENT SETNAME ([1381](https://github.com/redis-rs/redis-rs/pull/1381) ArtemIsmagilov)
* Async push messages: Allow for more channel types. ([1295]https://github.com/redis-rs/redis-rs/pull/1295)

Documentation improvements

* Add docs clarifying connection pool usage. ([1411](https://github.com/redis-rs/redis-rs/pull/1411))
* Describe as "for Redis" ([1423](https://github.com/redis-rs/redis-rs/pull/1423) zuiderkwast)
* Clarify RESP3 subscription documentation. ([1436](https://github.com/redis-rs/redis-rs/pull/1436))
* Add keywords to increase crate visibility. ([1425](https://github.com/redis-rs/redis-rs/pull/1425))
* Improve docs. ([1339](https://github.com/redis-rs/redis-rs/pull/1339))
* Add doc clarifying behavior of invoke_script. ([1396](https://github.com/redis-rs/redis-rs/pull/1396))

CI improvements

* Use cargo-nextest for testing. ([1336](https://github.com/redis-rs/redis-rs/pull/1336))
* test in CI against valkey 8. ([1362](https://github.com/redis-rs/redis-rs/pull/1362))
* Fix new lints. ([1426](https://github.com/redis-rs/redis-rs/pull/1426))
* Fix test_block_on_all_panics_from_spawns consistently failing on async_std. ([1368](https://github.com/redis-rs/redis-rs/pull/1368))

redis-0.27.5
Changes & Bug fixes

* Allow disabling timeouts in `ConnectionManager` ([1372](https://github.com/redis-rs/redis-rs/pull/1372) dcreager)
* Fix timeouts throwing Pubsub::get_message. ([1379](https://github.com/redis-rs/redis-rs/pull/1379))
* implement command `DRYRUN` ([1373](https://github.com/redis-rs/redis-rs/pull/1373) ArtemIsmagilov)
* Support for `hashbrown::HashMap` and `hashbrown::HashSet` ([1359](https://github.com/redis-rs/redis-rs/pull/1359) feelingsonice)
* impl CLIENT GETNAME ([1380](https://github.com/redis-rs/redis-rs/pull/1380) ArtemIsmagilov)

CI improvements

* Increase test CI action timeout. ([1370](https://github.com/redis-rs/redis-rs/pull/1370))

redis-0.27.4
* yanked due to https://github.com/redis-rs/redis-rs/issues/1375 *

Changes & Bug fixes

* Add lastid option to xclaim ([1360](https://github.com/redis-rs/redis-rs/pull/1360) urkle)
* Add xadd_options and xtrim_options ([1361](https://github.com/redis-rs/redis-rs/pull/1361) urkle)
* Sync connection: Handle timed-out responses by ignoring them. ([1290](https://github.com/redis-rs/redis-rs/pull/1290))
* Expose the sink and stream parts of an async pubsub to the user. ([1366](https://github.com/redis-rs/redis-rs/pull/1366))

CI improvements

* Add async iterator tests. ([1364](https://github.com/redis-rs/redis-rs/pull/1364))

redis-0.27.3
Changes & Bug fixes

* Add support for [TYPE type] in SCAN commands ([1332](https://github.com/redis-rs/redis-rs/pull/1332) Reiuji-ch)
* Align default timeouts on cluster client. ([1333](https://github.com/redis-rs/redis-rs/pull/1333))
* Updates unmaintained tokio-retry to tokio-retry2 ([1334](https://github.com/redis-rs/redis-rs/pull/1334) naomijub)
* Align verification of protocol & TLS during cluster creation. ([1289](https://github.com/redis-rs/redis-rs/pull/1289))
* Include the StreamExt use statement in docs ([1345](https://github.com/redis-rs/redis-rs/pull/1345) joshrotenberg)
* Further limit parser recursion ([1346](https://github.com/redis-rs/redis-rs/pull/1346))

CI improvements

* Improve testing async-std ([1314](https://github.com/redis-rs/redis-rs/pull/1314))
* Test against Valkey in CI. ([1315](https://github.com/redis-rs/redis-rs/pull/1315))
* Add CI action to test whether feature combinations compile. ([1328](https://github.com/redis-rs/redis-rs/pull/1328))

redis-0.27.2
Changes & Bug fixes

* Pubsub: Keep stream running after sink was closed. ([1330](https://github.com/redis-rs/redis-rs/pull/1330))

redis-0.27.1
Changes & Bug fixes

* fix sentinel feature error and update dependency ([1323](https://github.com/redis-rs/redis-rs/pull/1323) MokerWill)

redis-test-0.7.0
Update to version 0.27.0.

redis-0.27.0
Features

* Add r2d2 support for SentinelClient ([1297](https://github.com/redis-rs/redis-rs/pull/1297) smf8)
* Xinfo groups lag and entries-read support ([837](https://github.com/redis-rs/redis-rs/pull/837) massimiliano-mantione)
* Improve cluster documentation. [1263](https://github.com/redis-rs/redis-rs/pull/1263)
* Allow splitting async PubSub to Sink & Stream. [1144](https://github.com/redis-rs/redis-rs/pull/1144)
* Default for ConnectionManagerConfig ([1308](https://github.com/redis-rs/redis-rs/pull/1308) feelingsonice)
* Abort backing task to multiplexed connection on drop ([1264](https://github.com/redis-rs/redis-rs/pull/1264))

Changes & Bug fixes

* Fix new lints [1310](https://github.com/redis-rs/redis-rs/pull/1310)
* Use pipelines to setup connections [1250](https://github.com/redis-rs/redis-rs/pull/1250)
* Bump MSRV to 1.70 [1286](https://github.com/redis-rs/redis-rs/pull/1286)

New Contributors
* massimiliano-mantione made their first contribution in https://github.com/redis-rs/redis-rs/pull/837
* feelingsonice made their first contribution in https://github.com/redis-rs/redis-rs/pull/1308

**Full Changelog**: https://github.com/redis-rs/redis-rs/compare/redis-0.26.1...redis-0.27.0

redis-0.26.1
What's Changed

* update MultiplexedConnection by zh-jq in https://github.com/redis-rs/redis-rs/pull/1270
* bug: Exported configured-out item. by EmilyMatt in https://github.com/redis-rs/redis-rs/pull/1273


redis-0.26.0

0.26.0

Features

* **Breaking change**: Add RESP3 support ([1058](https://github.com/redis-rs/redis-rs/pull/1058) altanozlu)
* **Breaking change**: Expose Errors in `Value` [1093](https://github.com/redis-rs/redis-rs/pull/1093)
* Add max retry delay for every reconnect ([1194](https://github.com/redis-rs/redis-rs/pull/1194) tonynguyen-sotatek)
* Add support for routing by node address. [1062](https://github.com/redis-rs/redis-rs/pull/1062)
* **Breaking change**: Deprecate function that erroneously use tokio in its name. [1087](https://github.com/redis-rs/redis-rs/pull/1087)
* **Breaking change**: Change is_single_arg to num_of_args in ToRedisArgs trait ([1238](https://github.com/redis-rs/redis-rs/pull/1238) git-hulk)
* feat: add implementation of `ToRedisArgs`,`FromRedisValue` traits for `Arc<T>`,`Box<T>`,`Rc<T>` ([1088](https://github.com/redis-rs/redis-rs/pull/1088) xoac)
* MultiplexedConnection: Relax type requirements for pubsub functions. [1129](https://github.com/redis-rs/redis-rs/pull/1129)
* Add `invoke_script` to commands to allow for pipelining of scripts ([1097](https://github.com/redis-rs/redis-rs/pull/1097) Dav1dde)
* Adde MultiplexedConnection configuration, usable through Sentinel ([1167](https://github.com/redis-rs/redis-rs/pull/1167) jrylander)
* Slot parsing: Added handling to "?" and NULL hostnames in CLUSTER SLOTS. [1094](https://github.com/redis-rs/redis-rs/pull/1094)
* Add scan_options ([1231](https://github.com/redis-rs/redis-rs/pull/1231) alekspickle)
* Add un/subscribe commands to `aio::ConnectionManager`. [1149](https://github.com/redis-rs/redis-rs/pull/1149)
* Mark deprecated constructor functions. [1218](https://github.com/redis-rs/redis-rs/pull/1218)
* **Breaking change**: Fix nightly compilation warnings. This involved removing some functions, thus the breaking change.
https://github.com/redis-rs/redis-rs/pull/1229

Changes & Bug fixes

* Add xautoclaim command support ([1169](https://github.com/redis-rs/redis-rs/pull/1169) urkle)
* Add support of EXPIRETIME/PEXPIRETIME command ([1235](https://github.com/redis-rs/redis-rs/pull/1235) git-hulk)
* Implement `ToRedisArgs` for `std::borrow::Cow` ([1219](https://github.com/redis-rs/redis-rs/pull/1219) caass)
* Correct the document of default feature flags ([1184](https://github.com/redis-rs/redis-rs/pull/1184) naskya)
* Add xgroup_createconsumer command support ([1170](https://github.com/redis-rs/redis-rs/pull/1170) urkle)
* Route unkeyed commands to a random node. [1095](https://github.com/redis-rs/redis-rs/pull/1095)
* Add dependabot ([1053](https://github.com/redis-rs/redis-rs/pull/1053) oriontvv)
* impl `Clone` for `Msg` ([1116](https://github.com/redis-rs/redis-rs/pull/1116) publicqi)
* Make response_timeout Optional ([1134](https://github.com/redis-rs/redis-rs/pull/1134) zhixinwen)
* Remove redundant match. [1135](https://github.com/redis-rs/redis-rs/pull/1135)
* Update cluster_async router_command docs ([1141](https://github.com/redis-rs/redis-rs/pull/1141) joachimbulow)
* Remove unnecessary generics from multiplexed_connection. [1142](https://github.com/redis-rs/redis-rs/pull/1142)
* Fix compilation on Windows. ([1146](https://github.com/redis-rs/redis-rs/pull/1146) Yury-Fridlyand)
* fix 1150: change int types for expiry to `u64` ([1152](https://github.com/redis-rs/redis-rs/pull/1152) ahmadbky)
* check tls mode before setting it in the call of certs() ([1166](https://github.com/redis-rs/redis-rs/pull/1166) MyBitterCoffee)
* Fix explicit IoError not being recognized. [1191](https://github.com/redis-rs/redis-rs/pull/1191)
* Fix typos ([1198](https://github.com/redis-rs/redis-rs/pull/1198) wutchzone)
* Fix typos ([1213](https://github.com/redis-rs/redis-rs/pull/1213) jayvdb)
* Fix some typos in connection_manager.rs and client.rs ([1217](https://github.com/redis-rs/redis-rs/pull/1217) meierfra-ergon)
* Send retries in multi-node reconnect to new connection. [1202](https://github.com/redis-rs/redis-rs/pull/1202)
* Remove unnecessary clones from pubsub codepaths. [1127](https://github.com/redis-rs/redis-rs/pull/1127)
* MultiplexedConnection: Report disconnects without polling. [1096](https://github.com/redis-rs/redis-rs/pull/1096)
* Various documentation improvements. [1082](https://github.com/redis-rs/redis-rs/pull/1082)
* Fix compilation break. [1224](https://github.com/redis-rs/redis-rs/pull/1224)
* Split `Request` and routing from cluster async to separate files. [1226](https://github.com/redis-rs/redis-rs/pull/1226)
* Improve documentation of multiplexed connection. [1237](https://github.com/redis-rs/redis-rs/pull/1237)
* Fix async cluster documentation. [1259](https://github.com/redis-rs/redis-rs/pull/1259)
* Cluster connection - Refactor response handling. [1222](https://github.com/redis-rs/redis-rs/pull/1222)
* Add support of HASH expiration commands ([1232](https://github.com/redis-rs/redis-rs/pull/1232) git-hulk)
* Remove push manager [1251](https://github.com/redis-rs/redis-rs/pull/1251)
* Remove tokio dependency from non-aio build. [1265](https://github.com/redis-rs/redis-rs/pull/1265)

Dependency updates, lints & testing improvements

* Fix new lints. [1268](https://github.com/redis-rs/redis-rs/pull/1268)
* Fix flakey multi-threaded test runs. [1261](https://github.com/redis-rs/redis-rs/pull/1261)
* Fix documentation warning. [1258](https://github.com/redis-rs/redis-rs/pull/1258)
* Fix nightly compilation warnings. [1229](https://github.com/redis-rs/redis-rs/pull/1229)
* Fix fuzzer. [1145](https://github.com/redis-rs/redis-rs/pull/1145)
* Fix flakey test. [1221](https://github.com/redis-rs/redis-rs/pull/1221)
* Cluster creation in test: Try getting a new port if the current port isn't available. [1214](https://github.com/redis-rs/redis-rs/pull/1214)
* Log the server / cluster logfile on error. [1200](https://github.com/redis-rs/redis-rs/pull/1200)
* Remove loop from test. [1187](https://github.com/redis-rs/redis-rs/pull/1187)
* Add `valkey` crate [1168](https://github.com/redis-rs/redis-rs/pull/1168)
* Add tests for username+password authentication. [1157](https://github.com/redis-rs/redis-rs/pull/1157)
* Improve PushManager tests in sync connection ([1100](https://github.com/redis-rs/redis-rs/pull/1100) altanozlu)
* Fix issues that prevented cluster tests from running concurrently. [1130](https://github.com/redis-rs/redis-rs/pull/1130)
* Fix issue in cluster tests. [1139](https://github.com/redis-rs/redis-rs/pull/1139)
* Remove redundant call. [1112](https://github.com/redis-rs/redis-rs/pull/1112)
* Fix clippy warnings [1180](https://github.com/redis-rs/redis-rs/pull/1180)
* Wrap tests with modules. [1084](https://github.com/redis-rs/redis-rs/pull/1084)
* Add missing module skips. [1083](https://github.com/redis-rs/redis-rs/pull/1083)
* Add vscode settings to gitignore. [1085](https://github.com/redis-rs/redis-rs/pull/1085)

redis-0.25.3

0.25.3

* Handle empty results in multi-node operations ([1099](https://github.com/redis-rs/redis-rs/pull/1099))

redis-0.25.2

0.25.2

* MultiplexedConnection: Separate response handling for pipeline. ([1078](https://github.com/redis-rs/redis-rs/pull/1078))

redis-0.25.1

0.25.1

* Fix small disambiguity in examples ([1072](https://github.com/redis-rs/redis-rs/pull/1072) sunhuachuang)
* Upgrade to socket2 0.5 ([1073](https://github.com/redis-rs/redis-rs/pull/1073) djc)
* Avoid library dependency on futures-time ([1074](https://github.com/redis-rs/redis-rs/pull/1074) djc)

redis-0.25.0

Page 1 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.