https://github.com/zshipko/ocaml-redis-module
Redis Modules in OCaml
https://github.com/zshipko/ocaml-redis-module
ocaml redis
Last synced: 22 days ago
JSON representation
Redis Modules in OCaml
- Host: GitHub
- URL: https://github.com/zshipko/ocaml-redis-module
- Owner: zshipko
- License: isc
- Created: 2017-05-14T10:08:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-08T05:01:16.000Z (about 6 years ago)
- Last Synced: 2025-03-16T01:12:42.264Z (about 1 year ago)
- Topics: ocaml, redis
- Language: C
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# redis-module
`redis-module` provides bindings to the [redis](https://github.com/antirez/redis) module interface in OCaml.
## Installation
Using [opam](https://github.com/ocaml/opam):
```shell
$ opam pin add redis-module git+https://github.com/zshipko/ocaml-redis-module
```
## Usage
To use `redis-module` you need to build your project as a shared object. This can be done easily using [dune](https://github.com/ocaml/dune). The following is an example of the most basic working configuration:
```
(executable
(name example)
(modes shared_object)
(libraries redis-module))
```
You can then use `dune build $MODULE_PATH/example.so`, where `$MODULE_PATH` is the path to your OCaml source and `dune` file.
## Example
To build and run the example module run:
```shell
$ dune runtest --no-buffer
```
See `example/example.ml` for mor information