redismodules

A new awesome nimble package

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install redismodules
choosenim install redismodules
git clone https://github.com/luisacosta828/redismodules

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
redismodules - - - - - - -

Source

Repository https://github.com/luisacosta828/redismodules
Homepage https://github.com/luisacosta828/redismodules
Registry Source nimble_official

README

redismodules

Develop redis modules in Nimlang (WIP)

Usage

Install redismodules

nimble install redismodules@#head 

Write your module

import redismodules

proc HelloRedis(ctx: ptr Ctx, argv: ptr ptr String, argc: cint):cint {. exportc, dynlib .} =
    result = ReplyWithSimpleString(ctx,"nimlang redismodule ;)")

proc RedisModule_OnLoad(ctx: ptr Ctx, argv: ptr ptr String, argc: cint):cint {. exportc, dynlib .} =
     discard Init(ctx,"helloworld",1,1)
     result = CreateCommand(ctx,"helloworld.hello", HelloRedis, "readonly",0, 0, 0)

Build a dynamic library

nim c -d:release --app:lib [filename.nim]

Load your dynlib into your redis server

redis-server --loadmodule [fullpath of your module].so
#output 
* Module 'helloworld' loaded 

Start using your module

127.0.0.1:6379> helloworld.hello
#nimlang redismodule ;)