|
5 | 5 |
|
6 | 6 | # redismodule-rs |
7 | 7 |
|
8 | | -The Rust API for Redis Modules API is based on the https://github.com/brandur/redis-cell project. |
| 8 | +This crate provides an idiomatic Rust API for the [Redis Modules API](https://redis.io/topics/modules-intro). |
| 9 | +It allows writing Redis modules in Rust, without needing to use raw pointers or unsafe code. |
9 | 10 |
|
10 | 11 | # Running the example module |
11 | | -1. install [rust and cargo](https://www.rust-lang.org/tools/install) |
12 | | -2. install redis [(mac)](https://gist.github.com/tomysmile/1b8a321e7c58499ef9f9441b2faa0aa8) |
13 | | -3. run `cargo build --example hello` |
14 | | -4. start a redis server with the hello module |
| 12 | + |
| 13 | +1. [Install Rust](https://www.rust-lang.org/tools/install) |
| 14 | +2. [Install Redis](https://redis.io/download), most likely using your favorite package manager (Homebrew on Mac, APT or YUM on Linux) |
| 15 | +3. Run `cargo build --example hello` |
| 16 | +4. Start a redis server with the `hello` module |
15 | 17 | * Linux: `redis-server --loadmodule ./target/debug/examples/libhello.so` |
16 | 18 | * Mac: `redis-server --loadmodule ./target/debug/examples/libhello.dylib` |
17 | | -5. open a redis cli. and run `HELLO.MUL 31 11`. |
| 19 | +5. Open a Redis CLI, and run `HELLO.MUL 31 11`. |
| 20 | + |
| 21 | +# Writing your own module |
| 22 | + |
| 23 | +See the [examples](examples) directory for some sample modules. |
| 24 | + |
| 25 | +This crate tries to provide high-level wrappers around the standard Redis Modules API, while preserving the API's basic concepts. |
| 26 | +Therefore, following the [Redis Modules API](https://redis.io/topics/modules-intro) documentation will be mostly relevant here as well. |
| 27 | + |
| 28 | +# Redis Modules based on this crate |
| 29 | + |
| 30 | +The following are some modules that are built on this crate: |
| 31 | + |
| 32 | +- [RedisJSON](https://github.com/RedisJSON/RedisJSON) |
| 33 | +- [Rust API for RediSearch](https://github.com/RediSearch/redisearch-api-rs) |
| 34 | + |
| 35 | +Several member of the community have written their own modules based on this. |
0 commit comments