Migrating Redis® Modules

Migrating Redis® Modules to the Redict API #

Redict is binary compatible with Redis® Modules targetting Redis® OSS versions 7.2.4 and earlier. Modules built against redismodule.h may be loaded as a shared object via the loadmodule config option and --loadmodule command-line argument to redict-server in the same manner with which they are used with redis-server, without changes to the module source code.

If you are the maintainer of a Redis® Module and wish to migrate your module to target the Redict API instead, the following changes are required:

  1. Replace redismodule.h with redictmodule.h
  2. Replace Redis* symbols with Redict* (e.g. RedictModule_Init)
  3. Replace REDISMODULE_* macros with REDICTMODULE_* (e.g. REDICTMODULE_OK)

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.