+0
Daily
300
stars
77
forks
8
watchers
404
prs
87
issues
42
releases
README
redismodule-rs
This crate provides an idiomatic Rust API for the Redis Modules API.
It allows writing Redis modules in Rust, without needing to use raw pointers or unsafe code. See here for the most recent API documentation.
Running the example module
1. Install Rust
2. Install Redis, most likely using your favorite package manager (Homebrew on Mac, APT or YUM on Linux)
3. Run cargo build --example hello
4. Start a redis server with the hello module
Linux: redis-server --loadmodule ./target/debug/examples/libhello.so
Mac: redis-server --loadmodule ./target/debug/examples/libhello.dylib
5. Open a Redis CLI, and run HELLO.MUL 31 11.
Writing your own module
See the examples directory for some sample modules.
This crate tries to provide high-level wrappers around the standard Redis Modules API, while preserving the API's basic concepts.
Therefore, following the Redis Modules API documentation will be mostly relevant here as well.
Redis Modules based on this crate
The following are some modules that are built on this crate:
- RedisJSON
- Rust API for RediSearch
- RedisStateMachine
Several member of the community have written their own modules based on this.Top issues
#61Is there anyway of accessing the blocking client?7 comments · 2020-02-14#246How to use binary/bytes/stringbuffer type6 comments · 2022-10-24#226failed loading module after modifying source code5 comments · 2022-04-08#221Using RedisString::create(....) and running cargo test throws panicked at 'called `Option::unwrap()` on a `None` value5 comments · 2022-02-10#134Support for non-utf8/binary-safe data5 comments · 2021-03-10#55Improve thread safe context and locks managment 5 comments · 2019-10-31#7Parameters shouldn't be owned by command4 comments · 2019-05-06#380recommand to support windows3 comments · 2024-01-22
Latest release
redis-module-macros-v2.0.8 redis-module-macros-v2.0.8 2026-05-05Fixed - CI: Revamp the release pipeline, moving over to Trusted Publishing for all crates in the repository.