{"repo":"kristoff-it/zig-okredis","free":true,"listed":false,"github":"https://github.com/kristoff-it/zig-okredis","clone":"git clone https://github.com/kristoff-it/zig-okredis.git","description":"Zero-allocation Client for all the various Redis forks","language":"Zig","stars":293,"topics":["redis","zig","zero-allocation","redis-client","okredis"],"license":"MIT","category":"databases-storage","readme_excerpt":"OkRedis OkRedis is a zero-allocation client for Redis 6+ Handy and Efficient OkRedis aims to offer an interface with great ergonomics without compromising on performance or flexibility. Project status OkRedis is currently in alpha. The main features are mostly complete, but a lot of polishing is still required. Requires Zig v0.16.0-dev or above. Everything mentioned in the docs is already implemented and you can just zig run example.zig to quickly see what it can do. Remember OkRedis only supports Redis 6 and above. Zero dynamic allocations, unless explicitly wanted The client has two main interfaces to send commands: send and sendAlloc . Following Zig's mantra of making dynamic allocations explicit, only sendAlloc can allocate dynamic memory, and only does so by using a user-provided allocator. The way this is achieved is by making good use of RESP3's typed responses and Zig's metaprogramming facilities. The library uses compile-time reflection to specialize down to the parser level, allowing OkRedis to decode whenever possible a reply directly into a function frame, without any intermediate dynamic allocation . If you want more information about Zig's comptime: - Official documentation - What is Zig's Comptime? (blog post written by me) By using sendAlloc you can decode replies with arbrirary shape at the cost of occasionally performing dynamic allocations. The interface takes an allocator as input, so the user can setup custom allocation schemes such as arenas. Quickstart ","default_branch":null,"files":null,"tree":[],"storefront":"/r/kristoff-it","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kristoff-it/zig-okredis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}